用Eclipse(Version: 3.0.1)编译Qt的设置(qt-win-opensource-4.1.0-mingw.exe)
(1)安装Eclipse和CDT
(2)新建一个Managed Make C++ Project项目hello
(3)新增一个Source File main.cpp
#include <QtGui/QApplication>
#include <QtGui/QPushButton>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QPushButton hello("Hello world!");
hello.resize(100, 30);
hello.show();
return app.exec();
}
(4)在Project/Properties中选择C/C++ Build下的Tool Settings选项卡进行设置:
GCC C++ Compiler/Directories中浏览添加C:/Qt/4.1.0/include
GCC C++ Linker/Libraries中Libraries(-l)中添加QtCored4,QtGuid4,qtmaind
(注意不能写成libQtGuid4.a,libQtGuid4.a,libqtmaind.a)
Library search path(-L)中浏览添加C:/Qt/4.1.0/lib
(5)Run
本文详细介绍了如何使用Eclipse(Version:3.0.1)和CDT来配置Qt(qt-win-opensource-4.1.0-mingw.exe)。通过创建一个简单的C++项目并设置必要的编译选项,实现Qt应用程序的开发。
编译Qt的设置(qt-win-opensource-4.1.0-mingw.exe)&spm=1001.2101.3001.5002&articleId=598574&d=1&t=3&u=633db3cedac04f1086fe04793035b6b4)

被折叠的 条评论
为什么被折叠?



