Visual Studio 2010 nmake error
Page |
1 |
I downloaded qt-everywhere-opensource-src-4.7.2.zip; then I extracted it to C:\Qt.
I used the MSVS Command Prompt (2010), and typed in:
- configure -release -no-webkit -no-phonon -no-phonon-backend -no-script -no-scripttools -no-qt3support -no-ltcg
That worked OK, so then I did this:
- nmake
After a little while, I got the following error:
- mt.exe -nologo -manifest "tmp\obj\release_shared\QtCore.intermediate.man
- ifest" -outputresource:..\..\lib\QtCore4.dll;2
- NMAKE : fatal error U1077: '"C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\m
- t.exe"' : return code '0x1f'
- Stop.
- NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 10.0\VC\BI
- N\nmake.exe"' : return code '0x2'
- Stop.
- NMAKE : fatal error U1077: 'cd' : return code '0x2'
- Stop.
My specs are: Vista Home Premium 32-bit, and I’m using Microsoft Visual Studio 2010 Pro (via DreamSpark).
Any ideas on how I can resolve this?
24 replies
configure -release -no-webkit -no-phonon -no-phonon-backend -no-script -no-scripttools -no-qt3support -no-ltcg
You might need to specify the platform when using the configure command.
Best regards,
Leon
I too had problems trying to install Qt 4.7.2 and integrating it with visual studio. When I tried to compile Qt using nmake I always got an error stating that some dll was in use. The actual dll changed every time. After about 2 days of searching and trying things, I fixed it, but I’m not at all sure what was wrong.
Hopefully this will help. Here are the exact steps I had to do in order to compile:
1: I uninstalled all the QT binaries.
2: I deleted the Qt folder.
3: I downloaded the Visual Studio Add-in [qt.nokia.com]
4: I installed the visual studio add-in
5: I downloaded the Qt source code [get.qt.nokia.com]
6: I created New folders c:\Qt\4.7.2-vc\ and extracted the source code to it.
7: I set the environment variables:
QTDIR = C:\Qt\4.7.2-vc\
QMAKESPEC = win32-msvc2010
8: I added to the Path variable:
cd C:\Qt\4.7.2-vc\bin
!!Check!!
If you set it up like I did, then you should be able to do:
C:\Qt\4.7.2-vc\configure.exe -help
from the windows cmd prompt.
9: I downloaded the lasts version of “jom”: ftp://ftp.qt.nokia.com/jom/
10: I created the folder C:\Qt\4.7.2-vc\jom extracted the jom files to it
11: I restarted windows then opened the VISUAL STUDIO command prompt and ran
C:
cd C:\Qt\4.7.2-vc
configure -debug-and-release -opensource -platform win32-msvc2010
The configuration took awhile. After it was finished
12: I RESTARTED IN SAFE MODE!!!!
I don’t know why this step was important, but I had to do the actual compilation in safe mode.
13: Open the VISUAL STUDIO command prompt and run
C:
cd C:\Qt\4.7.2-vc
C:\Qt\4.7.2-vc\jom\jom.exe –j 8
8 is the number of CPU cores for my computer.
Building the file took a long time. By far the longest I have ever seen, but if finally finished.
Afterwards I had to open visual studio and configure the add-in. Below are the sites that helped me figure everything out.
http://www.holoborodko.com/pavel/2011/02/01/how-to-compile-qt-4-7-with-visual-studio-2010/
http://stackoverflow.com/questions/4379374/compiling-qt-visual-studio-2010
http://blog.paulnettleship.com/2010/11/11/troubleshooting-visual-studio-2010-and-qt-4-7-integration/
FYI: I’m on windows 7, using visual studio 2010 ultimate (version 10.0.30319.1), running on a Intel i7(q720). I compiled 4.72 LGPL version of the QT framework. I am using the Visual Studio Qt add-in 1.1.9-1.
I’m not sure if you “have” to compile it yourself or not, but I did. I remember reading somewhere during my search to fix the problem, that the qt binaries are for an older version of visual studio. Long story short, I assumed that I had to compile from source.
Step 13 is where I compiled the src code.
C:\Qt\4.7.2-vc\jom\jom.exe –j 8
is what starts the compile process.
Hmmm… Is Qt pure C++, or does it require any compilers for other languages?
- Error: Creating a shadow build of Qt requires
- perl to be in the PATH environment
(I’ll probably be able to work around this, but I’m just saying that it said that.)
That error means that you have qt installed (more precisely configured) already.
There is some command to undo a previous configuration. I don’t remember what it was. You could also install perl, but I think undoing the previous configuration is easier.
I think Qt uses perl for scripting. From what I understand, Qt uses a bunch of macros and meta commands to “extend” c++. Qmake then changes your code to actual c++ for compiling. But I’m just learning how to use Qt so, that’s just my guess.
When I ran:
- configure -debug-and-release -opensource -platform win32-msvc2010
It ran for a while. Then, I got:
- Creating qmake...
- Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
- Copyright (C) Microsoft Corporation. All rights reserved.
- Creating makefiles in src...
- Generating Visual Studio project files...
- Qmake failed, return code -1
- Generating Makefiles...
- Qmake failed, return code -1
OK, here it is this time:
- Setting environment for using Microsoft Visual Studio 2010 x86 tools.
- C:Program FilesMicrosoft Visual Studio 10.0VC>cd %QTDIR%
- C:Qt4.7.2-vc>configure -debug-and-release -opensource -platform win32-msvc2010
- This is the Qt for Windows Open Source Edition.
- You are licensed to use this software under the terms of
- the GNU Lesser General Public License (LGPL) version 2.1
- or the GNU General Public License (GPL) version 3.
- Type '3' to view the GNU General Public License version 3 (GPLv3).
- Type 'L' to view the Lesser GNU General Public License version 2.1 (LGPLv2.1).
- Type 'y' to accept this license offer.
- Type 'n' to decline this license offer.
- Do you accept the terms of the license?
- y
- Environment:
- INCLUDE=
- C:Program FilesMicrosoft Visual Studio 10.0VCINCLUDE
- C:Program FilesMicrosoft Visual Studio 10.0VCATLMFCINCLUDE
- C:Program FilesMicrosoft SDKsWindowsv7.0Ainclude
- LIB=
- C:Program FilesMicrosoft Visual Studio 10.0VCLIB
- C:Program FilesMicrosoft Visual Studio 10.0VCATLMFCLIB
- C:Program FilesMicrosoft SDKsWindowsv7.0Alib
- PATH=
- C:Program FilesMicrosoft F#v4.0
- C:Program FilesMicrosoft Visual Studio 10.0VSTSDBDeploy
- C:Program FilesMicrosoft Visual Studio 10.0Common7IDE
- C:Program FilesMicrosoft Visual Studio 10.0VCBIN
- C:Program FilesMicrosoft Visual Studio 10.0Common7Tools
- c:WindowsMicrosoft.NETFrameworkv4.0.30319
- c:WindowsMicrosoft.NETFrameworkv3.5
- C:Program FilesMicrosoft Visual Studio 10.0VCVCPackages
- C:Program FilesHTML Help Workshop
- C:Program FilesMicrosoft SDKsWindowsv7.0AbinNETFX 4.0 Tools
- C:Program FilesMicrosoft SDKsWindowsv7.0Abin
- C:Perlsitebin
- C:Perlbin
- C:Program FilesCommon FilesMicrosoft SharedWindows Live
- C:Windowssystem32
- C:Windows
- C:WindowsSystem32Wbem
- C:Program FilesZipGenius 6
- c:Program FilesMicrosoft SQL Server100ToolsBinn
- c:Program FilesMicrosoft SQL Server100DTSBinn
- C:PROGRA~1TIEDUC~1TI-83P~1UTILS
- C:WindowsSystem32WindowsPowerShellv1.0
- C:Program FilesWindows LiveShared
- C:Program FilesCalibre2
- C:Program FilesTortoiseHg
- C:Program FilesTortoiseSVNbin
- C:Program FilesQuickTimeQTSystem
- C:Qt4.7.2-vc
- C:Qt4.7.2-vcbin
- C:Program FilesMercurial
- You are licensed to use this software under the terms of the GNU GPL version 3.Y
- ou are licensed to use this software under the terms of the Lesser GNU LGPL vers
- ion 2.1.
- Configuration:
- minimal-config
- small-config
- medium-config
- large-config
- full-config
- build_all
- debug
- Qt Configuration:
- release
- debug
- zlib
- png
- accessibility
- opengl
- s60
- ipv6
- script
- scripttools
- xmlpatterns
- phonon
- phonon-backend
- multimedia
- audio-backend
- declarative
- native-gestures
- svg
- minimal-config
- small-config
- medium-config
- large-config
- full-config
- QMAKESPEC...................win32-msvc2010 (commandline)
- Architecture................windows
- Maketool....................nmake
- Debug symbols...............yes
- Link Time Code Generation...no
- Accessibility support.......yes
- STL support.................yes
- Exception support...........yes
- RTTI support................yes
- MMX support.................yes
- 3DNOW support...............yes
- SSE support.................yes
- SSE2 support................yes
- IWMMXT support..............no
- OpenGL support..............yes
- OpenVG support..............no
- OpenSSL support.............no
- QtDBus support..............no
- QtXmlPatterns support.......yes
- Phonon support..............yes
- QtMultimedia support........yes
- WebKit support..............yes
- Declarative support.........yes
- Declarative debugging.......yes
- QtScript support............yes
- QtScriptTools support.......yes
- Graphics System.............raster
- Qt3 compatibility...........yes
- Third Party Libraries:
- ZLIB support............qt
- GIF support.............plugin
- TIFF support............plugin
- JPEG support............plugin
- PNG support.............yes
- MNG support.............plugin
- FreeType support........no
- Styles:
- Windows.................yes
- Windows XP..............yes
- Windows Vista...........yes
- Plastique...............yes
- Cleanlooks..............yes
- Motif...................yes
- CDE.....................yes
- Windows CE..............no
- Windows Mobile..........no
- S60.....................no
- Sql Drivers:
- ODBC....................no
- MySQL...................no
- OCI.....................no
- PostgreSQL..............no
- TDS.....................no
- DB2.....................no
- SQLite2.................no
- InterBase...............no
- Sources are in..............C:Qt4.7.2-vc
- Build is done in............C:Qt4.7.2-vc
- Install prefix..............C:Qt4.7.2-vc
- Headers installed to........C:Qt4.7.2-vcinclude
- Libraries installed to......C:Qt4.7.2-vclib
- Plugins installed to........C:Qt4.7.2-vcplugins
- Imports installed to........C:Qt4.7.2-vcimports
- Binaries installed to.......C:Qt4.7.2-vcbin
- Docs installed to...........C:Qt4.7.2-vcdoc
- Data installed to...........C:Qt4.7.2-vc
- Translations installed to...C:Qt4.7.2-vctranslations
- Examples installed to.......C:Qt4.7.2-vcexamples
- Demos installed to..........C:Qt4.7.2-vcdemos
- Running syncqt...
- Creating qmake...
- Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
- Copyright (C) Microsoft Corporation. All rights reserved.
- Creating makefiles in src...
- Generating Visual Studio project files...
- execute: Unknown error
- (-nodepend)
- (-tp)
- (vc)
- (-r)
- (-o)
- Qmake failed, return code -1
- Generating Makefiles...
- execute: Unknown error
- (-r)
- (-o)
- Qmake failed, return code -1
- C:Qt4.7.2-vc>
Since you seem to be getting different errors each time, maybe using a shadow build (see this page [doc.qt.nokia.com]) would help – just to make sure you are building from scratch every time you start building. (Shadow building works for for Windows too, not just Windows CE, but you have to use the ‘-nomake examples’ configure option with Qt 4.7.3.) Alternatively, you could run ‘nmake distclean’ to clean things up, but I don’t know if you can be 100% sure that it really does clean everything.
I always have the same error:
c:\qt\4.7.2\include\qtcore\../../src/corelib/global/qt_windows.h(63) : fatal err
or C1083: Cannot open include file: ‘windows.h’: No such file or directory
NMAKE : fatal error U1077: ‘“c:\Program Files (x86)\Microsoft Visual Studio 9.0\
VC\BIN\cl.EXE”’ : return code ‘0×2’
Stop.
Building qmake failed, return code 2
I’ve followed agent8261 instructions up to step 11
1: I uninstalled all the QT binaries.
2: I deleted the Qt folder.
3: I downloaded the Visual Studio Add-in [qt.nokia.com]
4: I installed the visual studio add-in
5: I downloaded the Qt source code [get.qt.nokia.com]
6: I created New folders c:\Qt\4.7.2-vc\ and extracted the source code to it.
7: I set the environment variables:
QTDIR = C:\Qt\4.7.2-vc\
QMAKESPEC = win32-msvc2010
8: I added to the Path variable:
cd C:\Qt\4.7.2-vc\bin
!!Check!!
If you set it up like I did, then you should be able to do:
C:\Qt\4.7.2-vc\configure.exe -help
from the windows cmd prompt.
9: I downloaded the lasts version of “jom”: ftp://ftp.qt.nokia.com/jom/
10: I created the folder C:\Qt\4.7.2-vc\jom extracted the jom files to it
11: I restarted windows then opened the VISUAL STUDIO command prompt and ran
C:
cd C:\Qt\4.7.2-vc
configure -debug-and-release -opensource -platform win32-msvc2010
What can I do????????
Thanks
You must log in to post a reply. Not a member yet? Register here!






