2

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

Community
  • 1
  • 1
TurnsCoffeeIntoScripts
  • 3,868
  • 8
  • 41
  • 46
  • No platform specification in the configure command? Maybe that's not necessary when using configure.exe, though, I'm not sure. [Here](http://eecs.vanderbilt.edu/research/hmtl/wiki/pmwiki.php?n=Knowledge.Qt) is the way Qt is built from source for VS 2008 and 2010 in my lab. We have no problems. Perhaps you can compare notes on that install process and see where your problem lies. – Eli Hooten Jul 06 '12 at 22:32
  • Exact same error here with Qt 4.6.4, with VS2008 in 64bits, doing a simple: configure -release -static -fast -no-qt3support -no-webkit -no-phonon -no-dbus -no-openssl -platform win32-msvc2008 followed by nmake. I think Qt 4.8.2 had the same issue, but I don't remember well. – nbonneel Aug 30 '12 at 18:34

2 Answers2

3

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

stoneyang
  • 179
  • 1
  • 2
  • 12
1

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!

mweber
  • 1,292
  • 2
  • 10
  • 13