在windows 上安装 qt
2010-12-23 22:31
281 查看
从这里 http://qt.nokia.com/downloads 下载你需要 的版本
我安装的是 :Qt SDK: Complete Development Environment
我安装是这个版本安装完后,启动qt command prompt
"
Setting up a MinGW/Qt only environment..
-- QTDIR set to E:/Qt/2010.05/qt
-- PATH set to E:/Qt/2010.05/qt/bin
-- Adding E:/Qt/2010.05/bin to PATH
-- Adding C:/WINDOWS/System32 to PATH
-- QMAKESPEC set to win32-g++
"
但我想用vc编译, qmake -tp vc 结果
WARNING: Unable to generate output for: //Makefile.Debug [TEMPLATE vc]
原因出在这句 "QMAKESPEC set to win32-g++"
改为QMAKESPEC set to msvc-2008.
编译有错:
LINK : fatal error LNK1181: cannot open input file qtmaind.lib
解决方案:
•
Add this 2 paths to the Environment Variables: “C:/Qt/2009.01/bin” and “C:/Qt/2009.01/qt/bin”. Note: This path will depend where you install the Qt.
•
To add to the path: Control Panel > System > Advanced > Environment Variables
•
Select “PATH” under system variables. Click “EDIT” and Add this to the end of the line: C:/Qt/2009.01/bin; C:/Qt/2009.01/qt/bin (Remember to separate two paths with a “;”)
STEP 3: CONFIGURE QT FOR YOUR MACHINE
•
Run the Visual Studio Command prompt. Start > Program Files > Visual Studio > Visual Studio Tools > Visual Studio Command Prompt
•
Go to the path of your installed Qt e.g. cd C:/Qt/2009.01/qt
•
At the prompt type the command configure. E.g. C:/Qt/2009.01/qt> configure
•
This will configure Qt for your machine. In case you have multiple compilers installed, and want to build the Qt library using a specific compiler, you must specify a qmake specification. This is done by pasing -platform <spec> to configure. E.g. configure -platform win32-msvc
STEP 4: BUILDING QT FOR VISUAL STUDIO
•
Run nmake at the command prompt
•
This takes lots of time. Will build all the demos, examples and libraries.
That’s it QT is now installed. You can follow the tutorials to use Qt.
OK, it works.
相关文章推荐
- QT 4.5 windows版本 安装问题 及 Junction 使用
- Windows下mysql安装,生成qt驱动过程
- Qt在Windows上的调试器CDB安装与配置
- QT安装(linux,windows)
- Windows下的Qt环境安装
- C++ GUI Programming with Qt4 Second Edition 之 附录A.2 Windows系统Qt的安装
- QT程序安装包制作(windows)
- windows下vs2010中简单快捷安装qt…
- windows下 QT5.2安装
- 如何在Qt中处理(接收/发送)MFC或Windows消息(直接覆盖MainDialog::nativeEvent,或者QApplication::installNativeEventFilter安装过滤器,或者直接改写QApplication::nativeEventFilter)
- 【Qt开发】Qt Creator在Windows上的调试器安装与配置
- [翻译]为Windows安装QT
- qt:Windows 下 安装配置 QT 开发环境 ( 4.3.2 )
- Windows下使用Qt4.8编译安装qt-qtserialport经验教训
- 在windows里安装qca(Qt Cryptographic Architecture)
- Qt 在Windows下的安装于配置
- Windows下qtCreator与qt4.7安装与使用
- QT在windows下的安装与配置
- windows下Eclipse+MinGW+Qt+c++配置安装解决方法
- Windows下Qt4.7.4安装的大致过程