Visual Studio 2010 nmake error
-
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 '0x2'
Stop.
Building qmake failed, return code 2I'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-msvc2010What can I do????????
Thanks -
[quote author="muntoo" date="1304471289"]I've installed the Visual Studio 2010 Add-in. I'm still not sure whether I have to compile the source code, or if any of the installers will work with Visual Studio 2010.[/quote]
The vs2008 installer works fine for me on vs2010. I don't ever build from source with the installers...
-
I had the same problem yesterday when trying to build Qt 4.7.4 with VS2008, and I remember having this problem in the past with earlier versions too.
I then started Windows in Safe Mode and started compilation. It succeeded.
Apparently, Microsoft compiler is more stable in safe mode.
Jean
-
[quote author="muntoo" date="1305411723"]
Creating makefiles in src...
Generating Visual Studio project files...
execute: Unknown error
(-nodepend)
(-tp)
(vc)
(-r)
(C:/Qt/4.7.2-vc/projects.pro)
(-o)
(C:/Qt/4.7.2-vc)
Qmake failed, return code -1
[/quote]
It seems that you use wrong target architecture. For example, you may use "Visual Studio x64 command prompt" instead x86. -
Hi I have the same problem with windows 64 and Qt4.8 .
nmake falls in a warning loop after many time . -
when i run the command:
configure -debug-and-release -opensource -platform win32-msvc2010
i get an error which says windows.h files.
I've however installed the windows SDK but it's still giving me the error.
Please i need help -
Hi,
I am not aware of entire previous discussions but I think probable answer to your question about windows.h file might be ..
You have to set some environmental system variables.
I am using cl compiler and SDK and it works fine for me. I have the following environmental variables set..Variable name : INCLUDE
Variable value : C:\Program Files\Microsoft Visual Studio\VC98\atl\include;C:\Program Files\Microsoft Visual Studio\VC98\mfc\include;C:\Program Files\Microsoft Visual Studio\VC98\include;C:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\include;C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include;C:\Program Files\Microsoft Visual Studio 9.0\VC\include;C:\OpenSSL-Win32\include;C:\OpenSSL-Win32\include\openssl;I am using cl from Visual studio command prompt. I am not aware of any settings to be done for Visual studio debugger. This link might help you :
http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/c42cf8da-8718-4aa7-9a6a-9eef80f96c6e -
I have the same issue with muntoo, while building the current stable branch (5.1) from git.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\m
t.exe"' : return code '0x1f'Carefully reading http://qt-project.org/wiki/Building_Qt_5_from_Git , I guess it is because lack of Windows SDK 7.1.
But I failed to install Windows SDK 7.1. According to the page http://qt-project.org/wiki/Cannot_Install_Windows_SDK, I uninstalled the Microsoft Visual C++ 2010 Redistributable, but still failed with another error.
-
Hi,
Try to use jom instead of nmake that may solve your problem...
Refer to ...: http://qt-project.org/forums/viewthread/25776
-
At that time, I had other errors when using jom, posted at http://qt-project.org/forums/viewthread/26325 Afterwards I find another machine that can install Windows SDK and run nmake, then build successfully.
jom may indeed avoid the problem. In fact, I participate in your referred post http://qt-project.org/forums/viewthread/25776 :)
-
Sorry did not see that you were the one who posted the solution in the other post...
Just thought that it might be relevant and referred it. :-) -