PDA

View Full Version : Visual Studio 2012 + Qt5.0.2 Compilation Error



Rayven
25th April 2013, 17:32
I am compiling my program using Visual Studio 2012 Update 2 and Qt 5.0.2 and I am getting:



1>c:\qt\qt-everywhere-opensource-src-5.0.2\qtbase\include\qtcore\../../src/corelib/tools/qarraydataops.h(401): error C2171: '!' : illegal on operands of type ''unknown-type''
1>c:\qt\qt-everywhere-opensource-src-5.0.2\qtbase\include\qtcore\../../src/corelib/tools/qarraydataops.h(402): error C2171: '!' : illegal on operands of type ''unknown-type''
1>c:\qt\qt-everywhere-opensource-src-5.0.2\qtbase\include\qtcore\../../src/corelib/tools/qarraydataops.h(411): error C2171: '!' : illegal on operands of type ''unknown-type''

It is occuring on the compilation of the moc_*.cpp of a QMainWindow subclass. The application compiled just fine (run error on trying to find Hunspell DLL) just prior to adding a PATH environment variable to the hunspell DLL. Any ideas? When I removed the PATH, the error still continues and I cannot get it to go away. If I remove the code for the class that the error occurs on, it just occurs on another class.

ChrisW67
25th April 2013, 23:49
PATH is a red herring. You have a compilation error brought about by your code (or a faulty install of Qt) ... but since we cannot see that. You first port of call is to do a clean rebuild of the project.

Rayven
26th April 2013, 00:27
Apparently it was a faulty configuration of the project. using away the Solution and Project and rebuilt using the same code. Every thing built fine after that point. Really unsure what I did, but it was fixed.