PDA

View Full Version : Unable to Compile Application (Qt SDK v1.1.2) from Command Prompt - Windows 7



F3AR
3rd June 2012, 19:20
Hello Guys,
I am sorry if this has been asked before but I could not find an answer to my question.
Hence I have to ask it by making this thread.

I downloaded QT SDK v1.1.2 Offline Installer for Windows 7 64-bit (.exe) quite a while ago but couldn't learn QT at that time.I started learning it a bit now,hence installed the QT SDK v1.1.2 on my C: Drive.
But I made a application called "Hello World" from the tutorials available and hence created a .cpp and a .pro file to compile it.
So now tried to compile it(I don't know if QT SDK has a compiler or not as I haven't installed any compiler like Visual C etc.) in Command Prompt of Windows and as I use qmake to compile the Command Prompt shows "'qmake' is not recognized as an internal or external command,
operable program or batch file." error.
Now I started searching through the Internet for setting the Environment Variable Paths for qmake but everywhere I found different paths for adding but those paths were not available on my drive!(Don't have qt/bin folder etc.) I am attaching a Screenshot of my QtSDK folder in C: Drive.
So please someone reply me with the solution to compile the applications from command prompt. Thanxx and sorry for my super newbie questions. :P

My QTSDK Folder
http://www.mediafire.com/conv/f86fbcd67609e673c037ddc1e9a3f705d10f6d51542108fb0c ce75a93bd51dee6g.jpg

Zlatomir
3rd June 2012, 20:20
You can manually add the path to qmake into environment variables path or you can use the shortcut from StartMenu/Qt SDK/Desktop/Qt 4.x.x for Desktop (MinGW) - this one sets the paths to qmake (and it should also set the path to qt libraries)

F3AR
4th June 2012, 05:30
You can manually add the path to qmake into environment variables path or you can use the shortcut from StartMenu/Qt SDK/Desktop/Qt 4.x.x for Desktop (MinGW) - this one sets the paths to qmake (and it should also set the path to qt libraries)
mate thanxx for the reply +1... it solved the qmake problem but after running
qmake -project
qmake
the nmake and make command are showing that "not recognized as an internal or external command" error.
Please help..

ChrisW67
4th June 2012, 05:42
You are using the bundled MingW tools. The make command is mingw32-make

F3AR
4th June 2012, 06:33
Thanxx mate after that I got

mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory `C:/Users/Pranoy/Desktop/New folder'
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -
DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -
DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\..\
..\QtSDK\Desktop\Qt\4.7.3\mingw\include\QtCore" -I"..\..\..\..\QtSDK\Desktop\Qt\
4.7.3\mingw\include\QtGui" -I"..\..\..\..\QtSDK\Desktop\Qt\4.7.3\mingw\include"
-I"." -I"..\..\..\..\QtSDK\Desktop\Qt\4.7.3\mingw\include\A ctiveQt" -I"debug" -I
"..\..\..\..\QtSDK\Desktop\Qt\4.7.3\mingw\mkspecs\d efault" -o debug\project.o pr
oject.cpp
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-rel
oc -mthreads -Wl -Wl,-subsystem,windows -o "debug\New folder.exe" debug/project.
o -L"c:\QtSDK\Desktop\Qt\4.7.3\mingw\lib" -lmingw32 -lqtmaind -lQtGuid4 -lQtCor
ed4 -LC:\OpenSSL-Win32_full\lib
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-rel
oc -mthreads -Wl -Wl,-subsystem,windows -o "debug\New folder.exe" debug/project.
o -L"c:\QtSDK\Desktop\Qt\4.7.3\mingw\lib" -lmingw32 -lqtmaind -lQtGuid4 -lQtCor
ed4 -LC:\OpenSSL-Win32_full\lib
mingw32-make[1]: Leaving directory `C:/Users/Pranoy/Desktop/New folder'
after that nothing happen... what I have to do next to run the application?

ChrisW67
4th June 2012, 09:01
Run "debug\New Folder.exe"


Are you avoiding the Qt Creator IDE that ships in the Qt SDK for a reason?

F3AR
4th June 2012, 10:37
Run "debug\New Folder.exe"


Are you avoiding the Qt Creator IDE that ships in the Qt SDK for a reason?
I am unable to create project from qt creator properly... there are too make options there.. :confused:
Actually I am learning QT to develop applications for symbian devices... and I cant get perfect info that what is to be learned to develop those...
I know C and fairly C++ but I have never developed any application...
Can you list the languages which I have to learn for the purpose...? :)
I saw QML also... but I dont know will that help me in making applications... :rolleyes:

F3AR
6th June 2012, 07:48
Hello.. Can anyone reply??