Arch编译QT代码
原文:https://wiki.archlinux.org/index.php/Qt_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)#%E5%BC%80%E5%8F%91
C++
- Package:
- Website: http://qt-project.org/
- Build:
- The Qt4 version:
g++ $(pkg-config --cflags --libs QtGui) -o hello hello.cpp
- The Qt5 version:
g++ $(pkg-config --cflags --libs Qt5Widgets) -fPIC -o hello hello.cpp
- The Qt4 version:
- Run with:
./hello
//hello.cpp
#include <QApplication>
#include <QLabel>
int main(int argc, char **argv)
{
QApplication app(argc, argv);
QLabel hello("Hello world!");
hello.show();
return app.exec();
}