Edit 2 -
I don't have the application file qmake in the /bin folder and this is the error I am getting.
Path environment variable : C:\\development\\referencebuilds\\qt\\4.7.4\\qt-everywhere-opensource-src-4.7.4\\bin\\
Command Prompt - visual studio 2005
Source folder - C:\\development\\referencebuilds\\qt\\4.7.4\\qt-everywhere-opensource-src-4.7.4
Steps -
Downloaded src
Extracted the files to folder – qt-everywhere-opensource-src-4.7.4(C:\\development\\referencebuilds\\qt\\4.7.4)
configure.exe -opensource -fast -no-accessibility -no-qt3support -no-multimedia -no-audio-backend -no-phonon -no-phonon-backend -no-webkit -no-scripttools -platform win32-msvc2005 -D “_BIND_TO_CURRENT_VCLIBS_VERSION=1”
4.nmake
The error I get is
Microsoft (R) Program Maintenance Utility Version 8.00.50727.762 Copyright (C) Microsoft Corporation. All rights reserved.
C:\development\referencebuilds\qt\4.7.4\qt-everywhere-opensource-src-4.7
.4\\bin\\qmake C:/development/referencebuilds/qt/4.7.4/qt-everywhere-opensource-sr c-4.7.4/\\projects.pro -o Makefile -spec win32-msvc2005 'C:\\development\\referencebuilds\\qt\\4.7.4\\qt-everywhere-opensource-src-4.7.4\\bin\\ qmake' is not recognized as an internal or external command, operable program or batch file. NMAKE : fatal error U1077: 'C:\\development\\referencebuilds\\qt\\4.7.4\\qt-everywher e-opensource-src-4.7.4\\bin\\qmake' : return code '0x1' Stop.
Edit 1 Well, after trying out all the answers, the situation still remains the same. I think i should add more details to what I am doing.
I am copying bin files(.dll , Appplication, Application Extension, Incremental Linker File, Program Debug Database, ) from another machine and the version of Qt was 4.7.2
My questions are - 1. Do you see that as the cause for all the issues here? If yes, how do I get all the above files? If I just congigure as above and then run nmake I get
Microsoft (R) Program Maintenance Utility Version 8.00.50727.762 Copyright (C) Microsoft Corporation. All rights reserved.
C:\\development\\referencebuilds\\qt\\4.7.4\\bin\\qmake
C:/development/referen cebuilds/qt/4.7.4/\\projects.pro -o Makefile -spec win32-msvc2008 'C:\\development\\referencebuilds\\qt\\4.7.4\\bin\\qmake' is not recognized as an inte rnal or external command, operable program or batch file. NMAKE : fatal error U1077: 'C:\\development\\referencebuilds\\qt\\4.7.4\\bin\\qmake' : return code '0x1' Stop.
1, Downloaded the source file named
qt-everywhere-opensource-4.7.4
and saved it in folder c:\\development\\referencebuilds\\qt\\4.7.4\\
2, uncompressed the zip file and the files extracted into folder
c:\\development\\referencebuilds\\qt\\4.7.4\\qt-everywhere-opensource-4.7.4
3, Copied back all files from the folder
c:\\development\\referencebuilds\\qt\\4.7.4\\qt-everywhere-opensource-4.7.4
to c:\\development\\referencebuilds\\qt\\4.7.4\\
4, ran
configure.exe -opensource -fast -no-acce ssibility -no-qt3support -no-multimedia -no-audio-backend -no-phonon -no-phonon- backend -no-webkit -no-scripttools -platform win32-msvc2008 -D "_BIND_TO_CURRENT _VCLIBS_VERSION=1"
5, nmake and now I get the following errors.
C:\\development\\referencebuilds\\qt\\4.7.4\\bin\\qmake C:/development/referen cebuilds/qt/4.7.4/\\projects.pro -o Makefile -spec win32-msvc2008 Could not find mkspecs for your QMAKESPEC(win32-msvc2008) after trying:
C:\\Qt\\4.7.2\\mkspecs Error processing project file: C:/development/referencebuilds/qt/4.7.4//projects .pro NMAKE : fatal error U1077: 'C:\\development\\referencebuilds\\qt\\4.7.4\\bin\\qmake.EX E' : return code '0x3' Stop.
I have no clue as to why it is refering to C:\\Qt\\4.7.2\\mkspecs . How do I get over this error? what is exactly happening. How do I prevent such issues in future?
Your install directory is:
c:\\development\\referencebuilds\\qt\\4.7.4\\qt-everywhere-opensource-4.7.4
Let's call it $(QTDIR). Now:
This procedure usually gets the Qt build to work for me.
在调用configure和nmake之前,请确保路径中没有任何现有QT目录。
It looks like you have a previous version of Qt installed. "C:\\Qt\\4.7.2\\". And it would seem you have it setup in your system variables. Look for a variable called QTDIR in your system environment variables. Which is why you are getting an error, basically your 4.7.2 Qt is trying to build the new version.
Two options:
Un-install your old Qt via add/remove software in the control panel.
or
Remove your QTDIR system variable for the time being (will require a re-login) so that when you try to build from source it will use the correct binaries from the source folder.
Then just follow this guide:
http://en.wikibooks.org/wiki/Opticks_Developer_Guide/Getting_Started/Building_Qt_From_Source
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.