Bug 54813 - kbattleship doesn't compile with gcc 3.2.2
Summary: kbattleship doesn't compile with gcc 3.2.2
Status: RESOLVED FIXED
Alias: None
Product: knavalbattle
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Solaris
: NOR normal
Target Milestone: ---
Assignee: Nikolas Zimmermann
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-18 20:35 UTC by Aaron Williams
Modified: 2003-02-19 00:41 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aaron Williams 2003-02-18 20:35:15 UTC
Version:            (using KDE KDE 3.1)
Installed from:    Compiled From Sources
Compiler:          gcc 3.2.2 Sparc Sun Solaris 2.7 32-bit
OS:          Solaris

Compiling with QT-3.1.1 and GCC 3.2.2 results in the below error when compiling kbattleship.  Note that everything compiled without any problems when using GCC 2.95.3.

Note that between compiles that everything was completely cleaned (i.e. deleted old source directories, reextracted, configured, etc.)


/bin/ksh ../../../libtool --silent --mode=compile --tag=CXX /tools/gcc-3.2/bin/g++ -DHAVE_CONFIG_H -I. -I. -I../../.. -I/tools/kde/3.1gcc/include -I/tools/qt/qt-3.1.1gcc/include   -I/tools/qt/share/include  -DQT_THREAD_SUPPORT  -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4  -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -DNDEBUG -DNO_DEBUG -O2 -g -I/tools/qt/share/include -L/tools/qt/share/lib -fno-exceptions -fno-check-new -DQT_CLEAN_NAMESPACE -DQT_NO_COMPAT -DQT_NO_ASCII_CAST  -c -o libkbattleshipdialogs_la.all_cpp.lo `test -f 'libkbattleshipdialogs_la.all_cpp.cpp' || echo './'`libkbattleshipdialogs_la.all_cpp.cpp
In file included from libkbattleshipdialogs_la.all_cpp.cpp:3:
connectDlg.cpp: In constructor `clientConnectDlg::clientConnectDlg(QWidget*,
   const char*, bool, unsigned int)':
connectDlg.cpp:62: invalid use of undefined type `struct KHistoryCombo'
connectDlg.h:19: forward declaration of `struct KHistoryCombo'
connectDlg.cpp:63: invalid use of undefined type `struct KHistoryCombo'
connectDlg.h:19: forward declaration of `struct KHistoryCombo'
connectDlg.cpp:64: no matching function for call to `QHBoxLayout::addWidget(
   KHistoryCombo*&)'
/tools/qt/qt-3.1.1gcc/include/qlayout.h:379: candidates are: void
   QBoxLayout::addWidget(QWidget*, int = 0, int = 0)
make[4]: *** [libkbattleshipdialogs_la.all_cpp.lo] Error 1
make[4]: Leaving directory `/net/max/export/max1/tools/kde_3.1/archive/3.1gcc/kdegames-3.1/kbattleship/kbattleship/dialogs'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/net/max/export/max1/tools/kde_3.1/archive/3.1gcc/kdegames-3.1/kbattleship/kbattleship'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/net/max/export/max1/tools/kde_3.1/archive/3.1gcc/kdegames-3.1/kbattleship'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/net/max/export/max1/tools/kde_3.1/archive/3.1gcc/kdegames-3.1'
make: *** [all] Error 2
Comment 1 Aaron Williams 2003-02-18 22:39:22 UTC
By including kcombobox.h in connectDlg.h the compile finishes without any more 
problems.  The problem is that connectDlg.h is generated by uic.  Another 
solution would be to include kcombobox.h in connectDlg.cpp before including 
connectDlg.h. 
Comment 2 George Staikos 2003-02-19 00:41:58 UTC
Subject: kdegames/kbattleship/kbattleship/dialogs

CVS commit by staikos: 

Compilation fix.

CCMAIL: 54813-done@bugs.kde.org


  M +20 -1     connectDlg.ui   1.16


--- kdegames/kbattleship/kbattleship/dialogs/connectDlg.ui  #1.15:1.16
@@ -1,3 +1,3 @@
-<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
 <class>clientConnectDlg</class>
 <widget class="QDialog">
@@ -233,4 +233,10 @@
                         <enum>Expanding</enum>
                     </property>
+                    <property name="sizeHint">
+                        <size>
+                            <width>20</width>
+                            <height>20</height>
+                        </size>
+                    </property>
                 </spacer>
                 <widget class="QPushButton">
@@ -278,4 +284,10 @@
                         <enum>Expanding</enum>
                     </property>
+                    <property name="sizeHint">
+                        <size>
+                            <width>20</width>
+                            <height>20</height>
+                        </size>
+                    </property>
                 </spacer>
             </hbox>
@@ -303,4 +315,11 @@
     <tabstop>cancelBtn</tabstop>
 </tabstops>
+<includes>
+    <include location="global" impldecl="in implementation">kcombobox.h</include>
+</includes>
 <layoutdefaults spacing="6" margin="11"/>
+<includehints>
+    <includehint>kcombobox.h</includehint>
+    <includehint>klineedit.h</includehint>
+</includehints>
 </UI>