Results 1 to 3 of 3

Thread: Strange include problem

  1. #1
    Join Date
    Feb 2011
    Posts
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default Strange include problem

    My project will not build due to the following:

    In file included from c:\QtSDK\Desktop\Qt\4.7.2\mingw\include/QtCore/qstringlist.h:50,
    from c:\QtSDK\Desktop\Qt\4.7.2\mingw\include/QtGui/qcolor.h:47,
    from c:\QtSDK\Desktop\Qt\4.7.2\mingw\include/QtGui/qpalette.h:46,
    from c:\QtSDK\Desktop\Qt\4.7.2\mingw\include/QtGui/qwidget.h:49,
    from c:\QtSDK\Desktop\Qt\4.7.2\mingw\include/QtGui/qframe.h:45,
    from c:\QtSDK\Desktop\Qt\4.7.2\mingw\include\QtGui/qprogressbar.h:45,
    from c:\QtSDK\Desktop\Qt\4.7.2\mingw\include\QtGui/QProgressBar:1,
    from ..\logger\/../common/database.h:10,
    from ..\logger\/dataacquisition.h:9,
    from ..\logger\dataacquisition.cpp:2:
    c:\QtSDK\Desktop\Qt\4.7.2\mingw\include/QtCore/qstringmatcher.h:61: error: expected ',' or '...' before 'unsigned'
    c:\QtSDK\Desktop\Qt\4.7.2\mingw\include/QtCore/qstringmatcher.h:87: error: expected unqualified-id before 'unsigned'
    c:\QtSDK\Desktop\Qt\4.7.2\mingw\include/QtCore/qstringmatcher.h:87: error: expected ';' before 'unsigned'
    The lines this points to in qstringmatcher.h are:
    Qt Code:
    1. (61) QStringMatcher(const QChar *uc, int len,
    2. Qt::CaseSensitivity cs = Qt::CaseSensitive)
    3. (87) const QChar *uc;
    To copy to clipboard, switch view to plain text mode 

    I really don't know what to make of this error. Does anyone have a clue ?

  2. #2
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Strange include problem

    Most likely you forgot some ; after some instruction, at least one, here:
    Qt Code:
    1. QStringMatcher(const QChar *uc, int len,
    2. Qt::CaseSensitivity cs = Qt::CaseSensitive) ;
    To copy to clipboard, switch view to plain text mode 
    Possible other, before some unsigned we can't see in the code snippet you posted

  3. #3
    Join Date
    Feb 2011
    Posts
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Strange include problem

    It seems the problem was being caused by a library I had included that had:
    Qt Code:
    1. #define uc unsigned char
    To copy to clipboard, switch view to plain text mode 
    This didn't cause any problems until I (indirectly) included QStringMatcher which uses 'uc' as a variable-name.

Similar Threads

  1. Include problem after rebuild. Mac OSX 10.6
    By Manjak in forum Qt Programming
    Replies: 1
    Last Post: 5th March 2010, 13:07
  2. Opencv include problem
    By cae in forum Newbie
    Replies: 2
    Last Post: 12th February 2010, 09:25
  3. Problem with include of windows.h
    By QtNoob in forum Qt Programming
    Replies: 5
    Last Post: 26th May 2009, 22:50
  4. problem with include files
    By JR in forum General Discussion
    Replies: 2
    Last Post: 22nd December 2006, 20:44
  5. problem with an include
    By mickey in forum General Programming
    Replies: 1
    Last Post: 20th July 2006, 13:45

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.