Compiling source Qt 4.7.4 on windows 7 error qmake is not an internal or external command
-
Hi All,
EDIT -1I 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.
*I know I dont have the app files for qmake and many other appfiles in my \bin folder. How do I get them?
*I am trying to build QT 4.7.4 from the source. The package I downloaded was qt-everywhere-opensource-src-4.7.4 compressed zip.
PATH Environmentl Variable(System) - C:\development\referencebuilds\qt\4.7.4\qt-everywhere-opensource-src-4.7.4\bin;C:\development\referencebuilds\qt\4.7.4\qt-everywhere-opensource-src-4.7.4
QTDIR Environment Variable(System and User) Variable - C:\development\referencebuilds\qt\4.7.4\qt-everywhere-opensource-src-4.7.4\bin;C:\development\referencebuilds\qt\4.7.4\qt-everywhere-opensource-src-4.7.4
Here are the steps I performed.
- 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-msvc2008 -D "_BIND_TO_CURRENT_VCLIBS_VERSION=1"
I get the error -
Creating qmake...
execute: File or path is not found (nmake)
execute: File or path is not found (nmake)
Cleaning qmake failed, return code -1[edit : fixed typo in title, Eddy]
-
yes from VS command promt
-
I figured out that I don't have the app files in bin folder. How do I get them?
-
Define "the app files" please.
If you do start configure.exe from the visual studio command line prompt, it works, I have done this many uncountable times. So I just don't believe that you have started the VS command prompt, but only a regular cmd.exe, which does not have the correct environment set up.
-
@volker - Honestly , this is what is happening. I resolved the previous issue. I was using a 2005 cmd promt and had passed 2008 as the input. Now kindly have a look at this -
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.
I know I dont have the app files for qmake and many other appfiles in my \bin folder. How do I get them? -
qmake is built by the configure call, it's ok that it is not there until your configure.exe call has finished successfully. Most other tools are built by the nmake call.
It could be that some of your object files have been cluttered by the mixup of VS versions. Did you completely remove the complete source directory (qt-everywhere-opensource-src-4.7.4) and start over from scratch?
-
Yeah, I completely removed the directory and started from scratch. Now this is what I am trying to do . I installed the qt software development kit in the folder c:\QtSDK.. When I go into desktop\Qt\4.7.4\msvc2008\bin I find the files. I plan to copy them to the qt-everywhere-opensource-src-4.7.4\bin folder and try the whole thing again.
My questions are,
- Is this advisable to do?
- What else should I try?
-
No! No! No!
Never rebuild Qt from a prebuilt binary distribution or the SDK sources and never copy binaries from one installation to another one or a another source tree.
Always download the vanilla sources and run
@
configure.exe -with -your -options
nmake
@from the Visual Studio command prompt.
This is the only way known to always work reliably.
If you need different builds of the same Qt version, you must use different source tree directories!
PS:
Check the configure ouput whether it has picked up the right mkspec for you. If not, override it with -platform xyz. -
Ok, thanks. I will first
- Uninstall QtSDK
- Delete all files in the qteverywhere folder. Delete the source zip.
- Remove path set in the environment variable PATH.
- Download new source from a different branch and try again.
In case that fails, ill post back with the errors.
Thanks.
-
Ok, thanks. Ill start over again tomorrow.
-
Issue persists - As mentioned in earlier post I cleared all previous environment variables and downloaded a new source.
This is where I downloaded the source from
"http://qt.gitorious.org/qt/qt/trees/v4.7.4
Environment variable settings -
Path : C:\development\referencebuilds\qt\4.7.4\qt-qt\bin
QMAKESPEC : win32-msvc2008
Command Prompt - visual studio 2008
Source folder - C:\development\referencebuilds\qt\4.7.4\qt-qt\
Steps -
Downloaded src
-
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”
-
nmake
The error I get is
Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation. All rights reserved.C:\development\referencebuilds\qt\4.7.4\qt-qt\bin\qmake C:/development/r
eferencebuilds/qt/4.7.4/qt-qt/\projects.pro -o Makefile -spec win32-msvc2008
'C:\development\referencebuilds\qt\4.7.4\qt-qt\bin\qmake' is not recognized as a
n internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: 'C:\development\referencebuilds\qt\4.7.4\qt-qt\bin\qm
ake' : return code '0x1'
Stop. -
-
You should get the tarball from the "Qt download page":http://qt.nokia.com/downloads/downloads#qt-lib. Grab the source zip, unpack it and follow the steps I've mentioned.
A gitorious checkout is usually not meant for production use and you will need additional tools to prepare the source tree. The zip/tar.gz from the download page is ready to configure.
-
Ok , sure.
-
Ok , so this is what is happening. The steps mentioned by you works fine on my machine , which is a windows 7. It fails with error on the following machine where I am trying to install by remote login(using windows 7 remote desktop application)
OS: Windows Server Standard,
System - Processor : Quad-Core AMD Opteron(tm) Processor 2360 SE 2.50 Ghz (2 processors)
System type: 64-bit .The error I get is -
Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
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-msvc2008
'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.