Question

I'm trying to build Qt for visual studio 2010 and I'm following the instruction in the accepted answer of this post

I'm using the modified configure command:

configure.exe -release -no-webkit -no-phonon -no-phonon-backend -no-script -no-scripttools -no-qt3support -no-multimedia -qt-libpng -qt-zlib -qt-libmng -qt-libtiff -qt-libjpeg

Which works fine, but when I start the nmake it eventually fails and returns me this error:

itemviews\qabstractitemview.cpp(2311) : error C2039: 'Key_BackSpace' : is not a member of 'Qt'
itemviews\qabstractitemview.cpp(2311) : error C2065: 'Key_BackSpace' : undeclared identifier
itemviews\qabstractitemview.cpp(2311) : error C2051: case expression not constant

...

Generating Code...
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.

The original command I was using was the one used in the post mentionned earlier but I added these:

-qt-libpng -qt-zlib -qt-libmng -qt-libtiff -qt-libjpeg

and removed this:

-no-ltcg

for it to work properly, but the nmake still won't work.

Any help would be appreciated, thanks

Was it helpful?

Solution

Definitely way after the fact here, but I was able to work around this issue by commenting out the Qt::Key_BackSpace case in qabstractitemview.cpp on line 2311 for QT 4.6.4. I guess the key definition was changed in a patch or something equally goofy. You can find the file in /%My QT Directory%/src/gui/itemviews/qabstractitemview.cpp. Hope this helps!

OTHER TIPS

Or you could try to take this error from another perspective, like the typo or something else. In fact, this problem is kind of errors with typo. Try to modify the original Qt::Key_BackSpace to Qt::Key_Backspace, and nmake again. I have encountered the very problem you post here and I do have used the comment-out way. Until I occasionally took a look at my keyboard just under the screen..., yeah, it is Backspace rather than BackSpace!

Besides, to be more concrete, you may checkout the snippets in the same source files in the following versions, like:

Qt 4.7.4: %QTDIR%/src/gui/itemviews/qabstractitemview.cpp(2321): Qt::Key_Backspace

Qt 4.8.1: %QTDIR%/src/gui/itemviews/qabstractitemview.cpp(2337): Qt::Key_Backspace

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top