Qt 试用 (2)命令行工具.
qt 试用 (2)
启动Qt 4.7.4 for Desktop (MSVC 2008)
Setting up environment for Qt usage...
初始化vc命令行
C:\WINDOWS\system32>"C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86
Setting environment for using Microsoft Visual Studio 2008 x86 tools.
编写程序
G:\codes\testQt>notepad test.cpp
#include <qapplication.h>
#include <qlabel.h>
int main(int argc,char *argv[])
{
QApplication app(argc,argv);
QLabel *label=new QLabel("Hello Qt!",0);
app.setActiveWindow (label);
label->show();
return app.exec();
}
生成.pro文件
G:\codes\testQt>qmake -project
生成makefile
G:\codes\testQt>qmake testQt.pro
编译执行
G:\codes\testQt>nmake
Microsoft (R) Program Maintenance Utility Version 9.00.21022.08
Copyright (C) Microsoft Corporation. All rights reserved.
"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\nmake.exe" -f Makef
ile.Debug
Microsoft (R) Program Maintenance Utility Version 9.00.21022.08
Copyright (C) Microsoft Corporation. All rights reserved.
cl -c -nologo -Zm200 -Zc:wchar_t- -Zi -MDd -GR -EHsc -W3 -w34100 -w34189
-DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -D
QT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_T
HREAD_SUPPORT -I"c:\QtSDK\Desktop\Qt\4.7.4\msvc2008\include\QtCore" -I"c:\QtSDK\
Desktop\Qt\4.7.4\msvc2008\include\QtGui" -I"c:\QtSDK\Desktop\Qt\4.7.4\msvc2008\i
nclude" -I"." -I"c:\QtSDK\Desktop\Qt\4.7.4\msvc2008\include\ActiveQt" -I"debug"
-I"c:\QtSDK\Desktop\Qt\4.7.4\msvc2008\mkspecs\default" -Fodebug\ @C:\DOCUME~1\AD
MINI~1\LOCALS~1\Temp\nm172.tmp
test.cpp
link /LIBPATH:"c:\QtSDK\Desktop\Qt\4.7.4\msvc2008\lib" /NOLOGO /DEBUG /M
ANIFEST /MANIFESTFILE:"debug\testQt.intermediate.manifest" /SUBSYSTEM:WINDOWS "/
MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version
='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture=
'*'" /OUT:debug\testQt.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\nm173.tmp
qtmaind.lib(qtmain_win.obj) : warning LNK4099: PDB 'vc_ib_1.pdb' was not found w
ith 'c:\QtSDK\Desktop\Qt\4.7.4\msvc2008\lib\qtmaind.lib' or at 'G:\codes\testQt\
debug\vc_ib_1.pdb'; linking object as if no debug info
mt.exe -nologo -manifest "debug\testQt.intermediate.manifest" -outputres
ource:debug\testQt.exe;1
G:\codes\testQt>dir
驱动器 G 中的卷是 ll4
卷的序列号是 206D-B6FB
G:\codes\testQt 的目录
2011-09-10 13:48 <DIR> .
2011-09-10 13:48 <DIR> ..
2011-09-10 13:53 <DIR> debug
2011-09-10 13:47 7,486 Makefile
2011-09-10 13:47 6,382 Makefile.Debug
2011-09-10 13:47 6,380 Makefile.Release
2011-09-10 13:47 <DIR> release
2011-09-10 13:53 241 test.cpp
2011-09-10 13:47 308 testQt.pro
2011-09-10 13:53 495,616 vc90.pdb
6 个文件 516,413 字节
4 个目录 44,725,497,856 可用字节
G:\codes\testQt>dir debug
驱动器 G 中的卷是 ll4
卷的序列号是 206D-B6FB
G:\codes\testQt\debug 的目录
2011-09-10 13:53 <DIR> .
2011-09-10 13:53 <DIR> ..
2011-09-10 13:53 49,096 test.obj
2011-09-10 13:53 33,280 testQt.exe
2011-09-10 13:53 495,576 testQt.ilk
2011-09-10 13:53 878 testQt.intermediate.manifest
2011-09-10 13:53 707,584 testQt.pdb
5 个文件 1,286,414 字节
2 个目录 44,725,497,856 可用字节
G:\codes\testQt>debug\testQt.exe
- 上一篇 Qt 试用 (1)
- 下一篇 Fltk试用 (1).