Results 1 to 2 of 2

Thread: QTCreator is using wrong version of nmake

  1. #1
    Join Date
    Apr 2010
    Posts
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default QTCreator is using wrong version of nmake

    I have numerous versions of Visual Studio installed on my PC, but have configured QT to use win32-msvc2008. However, when I use QTCreator, it uses the corect settings for QMAKE, but then tries to compile and link using the wrong version of NMAKE (ie '...Microsoft Visual Studio 8/VC/BIN/nmake.exe' instead of '...Microsoft Visual Studio 9.0/VC/BIN/nmake.exe').

    How can I configure the QTCreator to use the correct version? I have already tried setting the VSINSTALLDIR, VCINSTALLDIR and PATH variables to the correct folder. I have also tried to run qtcreator.exe from the VS2008 CMD prompt. Still no luck; although, I can build the application using NMAKE from the VS2008 CMD prompt. Any advise appreciated, it's got me stumped.

    I have installed both 'qt-sdk-win-opensource-2010.02.1.exe' and 'qt-win-opensource-4.6.2-vs2008.exe' and have reconfigured both using the 'configure -platform win32-msvc2008' option when they did not work. Here is the error from QTCreator (with a sample app called blah, a form with a button).

    Running build steps for project blah...
    Starting: c:/qt/4.6.2/bin/qmake.exe C:/Qt/Projects/blah/blah.pro -spec win32-msvc2008 -r
    Exited with code 0.
    Starting: C:/Program Files/Microsoft Visual Studio 8/VC/BIN/nmake.exe

    "C:\Program Files\Microsoft Visual Studio 8\VC\BIN\nmake.exe" -f Makefile.Debug
    c:\Qt\4.6.2\bin\uic.exe mainwindow.ui -o ui_mainwindow.h
    C:\Qt\4.6.2\bin\moc.exe -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"..\..\4.6.2\include\QtCore" -I"..\..\4.6.2\include\QtGui" -I"..\..\4.6.2\include" -I"..\..\4.6.2\include\ActiveQt" -I"debug" -I"." -I"..\..\4.6.2\mkspecs\win32-msvc2008" -D_MSC_VER=1500 -DWIN32 mainwindow.h -o debug\moc_mainwindow.cpp
    Microsoft (R) Program Maintenance Utility Version 8.00.50727.762
    Copyright (C) Microsoft Corporation. All rights reserved.
    Microsoft (R) Program Maintenance Utility Version 8.00.50727.762
    Copyright (C) Microsoft Corporation. All rights reserved.

    cl -c -nologo -Zm200 -Zc:wchar_t- -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"..\..\4.6.2\include\QtCore" -I"..\..\4.6.2\include\QtGui" -I"..\..\4.6.2\include" -I"..\..\4.6.2\include\ActiveQt" -I"debug" -I"." -I"..\..\4.6.2\mkspecs\win32-msvc2008" -Fodebug\ @C:\DOCUME~1\mknight\LOCALS~1\Temp\nm57.tmp
    main.cpp
    mainwindow.cpp
    Generating Code...
    cl -c -nologo -Zm200 -Zc:wchar_t- -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"..\..\4.6.2\include\QtCore" -I"..\..\4.6.2\include\QtGui" -I"..\..\4.6.2\include" -I"..\..\4.6.2\include\ActiveQt" -I"debug" -I"." -I"..\..\4.6.2\mkspecs\win32-msvc2008" -Fodebug\ @C:\DOCUME~1\mknight\LOCALS~1\Temp\nm58.tmp
    moc_mainwindow.cpp
    link /LIBPATH:"c:\Qt\4.6.2\lib" /NOLOGO /DEBUG /MANIFEST /MANIFESTFILE:"debug\blah.intermediate.manifest" /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /OUT:debug\blah.exe @C:\DOCUME~1\mknight\LOCALS~1\Temp\nm59.tmp
    qtmaind.lib(qtmain_win.obj) : fatal error LNK1103: debugging information corrupt; recompile module
    NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\link.EXE"' : return code '0x44f'
    Stop.
    NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\nmake.exe"' : return code '0x2'
    Stop.
    Exited with code 2.
    Error while building project blah
    When executing build step 'Make'
    Last edited by mrknight; 21st May 2010 at 02:50.

  2. #2
    Join Date
    Apr 2010
    Posts
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QTCreator is using wrong version of nmake

    I found the problem, it existed between the keyboard and the chair. After trolling through the help file, I found a reference to setting the version of visual studio in Tools-->Options-->QT4-->QT4 Versions-->MSVC Version = 9.0. Fairly simple when you know where to look; unfortunately, I didn't!

Similar Threads

  1. Replies: 5
    Last Post: 15th March 2010, 03:25
  2. Replies: 0
    Last Post: 11th August 2009, 10:38
  3. Compilation error with MSVC: Wrong MOC version
    By vuakko in forum Qt Programming
    Replies: 3
    Last Post: 26th June 2009, 10:59
  4. Replies: 5
    Last Post: 5th October 2008, 06:12
  5. Linking to wrong version of Qt in Cmake
    By Matt Smith in forum Qt Programming
    Replies: 1
    Last Post: 9th December 2007, 11:39

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.