PDA

View Full Version : Strange include problem



lauwe
3rd April 2011, 12:51
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:


(61) QStringMatcher(const QChar *uc, int len,
Qt::CaseSensitivity cs = Qt::CaseSensitive)
(87) const QChar *uc;


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

Zlatomir
3rd April 2011, 13:01
Most likely you forgot some ; after some instruction, at least one, here:

QStringMatcher(const QChar *uc, int len,
Qt::CaseSensitivity cs = Qt::CaseSensitive) ;
Possible other, before some unsigned we can't see in the code snippet you posted ;)

lauwe
3rd April 2011, 13:37
It seems the problem was being caused by a library I had included that had:


#define uc unsigned char

This didn't cause any problems until I (indirectly) included QStringMatcher which uses 'uc' as a variable-name.