PDA

View Full Version : QT 4.4 setup help with VC++ 2008 Express



Chronos
24th June 2008, 16:02
Hello everybody :), I'm completely new to QT and need some help setting up the current (Open-Source) version of QT with Visual Studio 2008 Express edition. I've looked at the other threads on this forum but couldn't really understand any of them (no real experience with the command line). I took a look at his link though (http://www.pc-maniac.com/?p=59) and seem to be a bit stuck. I placed the folder titled qt-win-opensource-src-4.4.0 inside the Documents folder inside the Visual Studio 2008 folder. Could someone please tell exactly what I'm required to type within the Visual Studio 2008 command line ? Or, if possible, clearly state everything I'm required to do from start to finish ? I would greatly appreciate any help, thanks :D

zhehongwang
24th June 2008, 16:42
1. put the qt files under the directory, i.e., C:\Qt\4.4.0
2. type configure
3. type nmake
4. type nmake clean

Chronos
24th June 2008, 19:57
Hi, thanks for your help, however your solution doesn't seem to be working. I copied everything from the extracted Qt folder into the directories you stated. However, when I enter the command line, I type the directory the Qt files are in (C:\Qt\4.4.0), then I press the space and type configure and hit enter. I then get an error stating that it is not recognized as an internal or external command, operable program, or batch file. Any suggestions or help ? Sorry, to bother you with this.

superrick
25th June 2008, 03:54
Hi, There

Following is the method what I successfully did it and for your reference:

1. download "VC++ 2008 Exp" and "qt-win-opensource-src-4.4.0" from officical websites
2. install VC++ 2008 Exp first
3. unzip "qt-win-opensource-src-4.4.0", i.e. "C:\Qt\4.4.0"
4. add "c:\Qt\4.4.0";"c:\Qt\4.4.0\Bin" to your Env Path, and QMAKESPEC=win32-msvc2008
5. open VC++ 2008 Command Prompt/Console from it's Tool Option.
6. go to Qt Directory: "cd c:\Qt\4.4.0"
7. run "configure.exe", then select "y" for yes. (maybe wait for 30~60mins)
8. run "nmake" (maybe wait for 1~4hrs)
9. open VC++ 2008 IDE, select [Tool]->[Option]->[Projects]->[VC++path]
and add following settings:
--> [Execute]: add "c:\Qt\4.4.0" and "c:\Qt\4.4.0\Bin"
--> [Include]: add "c:\Qt\4.4.0" and "c:\Qt\4.4.0\Include"
--> [Lib]: add "c:\Qt\4.4.0" and "c:\Qt\4.4.0\Lib"
10. now, using an editor to create a code, i.e.
#include <QApplication>
#include <QLabel>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QLabel *label = new QLabel("Hello Qt!");
label->show();
return app.exec();
}
11. then need to create a project for VC++, in the Command Prompt run:
(A) qmake -project
(B) qmake -t vcapp
now, supposed you should get a *.vcproj
12. using VC++2008 IDE to open the *.vcproj
13. build the project..
14. Run it.. then you will see a window with "Hello Qt!" mesg..

:-)

deville75
21st July 2009, 15:14
Hi All,
in addition to this question, I'm trying to build my project to create the .exe file. After building it I can't seem to find the .exe file. I'm quite new to VC++ and QT as well. Your help is much appreciated!

jeffpogo
21st July 2009, 19:40
I found that using the VC++ Express edition is not worth the time and trouble. Use Creator or try to obtain a copy of VC++ that supports the Visual Studio Add-in. :)