#include <QApplication>
#include <QPushButton>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QPushButton hello("Hello world!");
hello.resize(100, 30);
hello.show();
return app.exec();
}
在dev-c++中编译的:
[Linker error] undefined reference to `_imp___ZN12QApplicationC1ERiPPc'
[Linker error] undefined reference to `_imp___ZN11QPushButtonC1ERK7QStringP7QWidget'
[Linker error] undefined reference to `_imp___ZN12QApplication4execEv'
一串类似的错误提示,我搞了半天也不知道是哪里的问题。