代码: 全选
sudo apt-get install libqt4-dev libqt4-debug libqt4-gui libqt4-sql qt4-dev-tools qt4-doc qt4-designer qt4-qtconfig
测试的程序就是简单的hello.cpp 肯定是没有错误的
代码: 全选
$ qmake-qt4 -project
$ qmake-qt4
$ make
$ ./qt4hello
代码: 全选
qmake -project
qmake
make
代码: 全选
g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I. -I. -I/usr/include/qt5 -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I. -o hello.o hello.cpp
hello.cpp:1:25: fatal error: QApplication: 没有那个文件或目录
#include <QApplication>
^
compilation terminated.
而且主要是qtcreator 也无法运行,也是一样的问题,求问要怎么解决
操作系统是kylin14.04