Results 1 to 5 of 5

Thread: Qt Compile Errors?

  1. #1
    Join Date
    Sep 2006
    Posts
    15
    Thanks
    2

    Unhappy Qt Compile Errors?

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt Compile Errors?

    Quote Originally Posted by magikalpnoi
    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?

  3. #3
    Join Date
    Sep 2006
    Posts
    15
    Thanks
    2

    Default Re: Qt Compile Errors?

    class QList;

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

  4. #4
    Join Date
    Sep 2006
    Posts
    15
    Thanks
    2

    Default Re: Qt Compile Errors?

    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.

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt Compile Errors?

    Quote Originally Posted by magikalpnoi
    class QList;
    It should be:
    Qt Code:
    1. template < typename T > class QList;
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. Project won't compile under Windows (works under Linux)
    By philski in forum Qt Programming
    Replies: 7
    Last Post: 14th September 2006, 15:29
  2. how to correctly compile threads support?
    By srhlefty in forum Installation and Deployment
    Replies: 9
    Last Post: 25th June 2006, 19:15
  3. Problem to compile with MinGW + Qt 4 + winpcap
    By jlbrd in forum Qt Programming
    Replies: 4
    Last Post: 4th May 2006, 16:32
  4. Errors including shellapi.h
    By SkripT in forum Qt Programming
    Replies: 8
    Last Post: 1st May 2006, 18:13
  5. Can't Compile Tutorial 7
    By Reenen in forum Newbie
    Replies: 10
    Last Post: 9th February 2006, 14:06

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.