PDA

View Full Version : Qt Compile Errors?



magikalpnoi
14th September 2006, 21:27
I've finished porting my qt3.3 to qt 4.2 code and now I am getting errors on Qt's code. I've already changed the QTDIR and PATH Environmental Variables to the new QT directory. I also changed the Additional Libraries and Dependencies in the Linker of my project to:
$(QTDIR)\lib
--and--
c:\Qt\4.2.0-rc1\lib\qtmaind.lib
c:\Qt\4.2.0-rc1\lib\QtGuid4.lib
c:\Qt\4.2.0-rc1\lib\QtCored4.lib
And lastly, I changed the Additional Include Directories to:
$(QTDIR)\include\
" " and all folders within \include\
C:\Qt\4.2.0-rc1\mkspecs\win32-msvc.net

Can anyone help me figure out why I am getting these QList errors?

c:\Qt\4.2.0-rc1\include\Qt\../../src\corelib\tools\qlist.h(301) : error C2989: 'QList' : template class has already been defined as a non-template class
c:\Documents and Settings\sm135c\Desktop\FitCheck\FitcheckDB.h(26) : see declaration of 'QList'
c:\Qt\4.2.0-rc1\include\Qt\../../src\corelib\tools\qlist.h(71) : error C3857: 'QList': multiple template parameter lists are not allowed
c:\Qt\4.2.0-rc1\include\Qt\../../src\corelib\tools\qlist.h(310) : error C2143: syntax error : missing ';' before '<'
c:\Qt\4.2.0-rc1\include\Qt\../../src\corelib\tools\qlist.h(310) : error C2182: 'QList' : illegal use of type 'void'
c:\Qt\4.2.0-rc1\include\Qt\../../src\corelib\tools\qlist.h(310) : error C2433: 'QList' : 'inline' not permitted on data declarations
c:\Qt\4.2.0-rc1\include\Qt\../../src\corelib\tools\qlist.h(310) : error C2988: unrecognizable template declaration/definition
c:\Qt\4.2.0-rc1\include\Qt\../../src\corelib\tools\qlist.h(310) : error C2059: syntax error : '<'
c:\Qt\4.2.0-rc1\include\Qt\../../src\corelib\tools\qlist.h(310) : error C2039: 'node_construct' : is not a member of 'operator``global namespace'''
c:\Qt\4.2.0-rc1\include\Qt\../../src\corelib\tools\qlist.h(318) : error C2039: 'node_destruct' : is not a member of 'operator``global namespace'''
c:\Qt\4.2.0-rc1\include\Qt\../../src\corelib\tools\qlist.h(319) : error C2143: syntax error : missing ';' before '{'
c:\Qt\4.2.0-rc1\include\Qt\../../src\corelib\tools\qlist.h(319) : error C2447: '{' : missing function header (old-style formal list?)
c:\Qt\4.2.0-rc1\include\Qt\../../src\corelib\tools\qlist.h(325) : error C2143: syntax error : missing ';' before '<'
c:\Qt\4.2.0-rc1\include\Qt\../../src\corelib\tools\qlist.h(325) : error C2182: 'QList' : illegal use of type 'void'
c:\Qt\4.2.0-rc1\include\Qt\../../src\corelib\tools\qlist.h(325) : error C2433: 'QList' : 'inline' not permitted on data declarations
c:\Qt\4.2.0-rc1\include\Qt\../../src\corelib\tools\qlist.h(325) : error C2086: 'int QList' : redefinition
c:\Qt\4.2.0-rc1\include\Qt\../../src\corelib\tools\qlist.h(310) : see declaration of 'QList'
c:\Qt\4.2.0-rc1\include\Qt\../../src\corelib\tools\qlist.h(325) : error C2988: unrecognizable template declaration/definition
c:\Qt\4.2.0-rc1\include\Qt\../../src\corelib\tools\qlist.h(325) : error C2059: syntax error : '<'
c:\Qt\4.2.0-rc1\include\Qt\../../src\corelib\tools\qlist.h(325) : error C2039: 'node_copy' : is not a member of 'operator``global namespace'''
c:\Qt\4.2.0-rc1\include\Qt\../../src\corelib\tools\qlist.h(336) : error C2039: 'node_destruct' : is not a member of 'operator``global namespace'''
c:\Qt\4.2.0-rc1\include\Qt\../../src\corelib\tools\qlist.h(337) : error C2143: syntax error : missing ';' before '{'
c:\Qt\4.2.0-rc1\include\Qt\../../src\corelib\tools\qlist.h(337) : error C2447: '{' : missing function header (old-style formal list?)
c:\Qt\4.2.0-rc1\include\Qt\../../src\corelib\tools\qlist.h(345) : error C2143: syntax error : missing ';' before '<'
c:\Qt\4.2.0-rc1\include\Qt\../../src\corelib\tools\qlist.h(345) : error C2433: 'QList' : 'inline' not permitted on data declarations
c:\Qt\4.2.0-rc1\include\Qt\../../src\corelib\tools\qlist.h(345) : error C2501: 'QList' : missing storage-class or type specifiers
c:\Qt\4.2.0-rc1\include\Qt\../../src\corelib\tools\qlist.h(345) : error C2086: 'int QList' : redefinition
c:\Qt\4.2.0-rc1\include\Qt\../../src\corelib\tools\qlist.h(310) : see declaration of 'QList'

Qt made files should not be throwing errors. Thank you so much in advance.

-Zach

jacek
14th September 2006, 22:09
Qt made files should not be throwing errors.
Yes and they don't do it, unless you break them.

What do you have in c:\Documents and Settings\sm135c\Desktop\FitCheck\FitcheckDB.h file on line 26?

magikalpnoi
14th September 2006, 22:10
class QList;

Just a forward class declaration. That should be a huge problem right?

magikalpnoi
14th September 2006, 22:13
ACTUALLY WAIT! You are a GENIUS! I think that is the error. The QListVariant is a QVariant typedef not QList. Well played sir. Well played.

jacek
14th September 2006, 22:18
class QList;
It should be:

template < typename T > class QList;