我使用此代码创建一个hello程序,请遵循此document:
#include <QApplication>
#include <QPushButton>
int main(int argc, char **argv)
{
QApplication app (argc, argv);
QPushButton button ("Hello world !");
button.show();
return app.exec();
}
但是,qmake命令有错误。
root @ ubuntu:/ home / fgit / helloqt #make arm-linux-g ++ -Wl,-rpath-link,/ tmp / FriendlyARM / nanopi2 / libs / usr / lib -Wl,-O1 -Wl,-rpath,/ usr / local / Trolltech / QtEmbedded-4.8.6-arm / lib -o helloqt main.o -L / tmp / FriendlyARM / nanopi2 / libs / usr / lib -L / usr / local / Trolltech / QtEmbedded-4.8.6-arm / lib -lQtGui -L / usr / local / Trolltech / QtEmbedded-4.8.6-arm / lib -L / tmp / FriendlyARM / nanopi2 / libs / usr / lib -lQtNetwork -lQtCore -lpthread /opt/FriendlyARM/toolchain/4.9.3/lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9 -linux-gnueabihf /斌/ ld.bfd: 警告:libts-1.0.so.0,需要 /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so,未找到 (尝试使用-rpath或-rpath-link) /opt/FriendlyARM/toolchain/4.9.3/lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/bin/ld .bfd: 警告:libz.so.1,需要 /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so,未找到 (尝试使用-rpath或-rpath-link) /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so:undefined 参考
deflateInit_' /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to
deflateInit2 _&#39; /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so:undefined 引用compress' /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtCore.so: undefined reference to
解压缩&#39; /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so:undefined 参考deflate' /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtCore.so: undefined reference to
compress2&#39; /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so:undefined 参考deflateEnd' /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to
crc32&#39; /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so:undefined 引用inflate' /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to
inflateInit2 _&#39; /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so:undefined 参考inflateInit_' /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to
ts_read_raw&#39; /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so:undefined 参考inflateEnd' /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to
ts_open&#39; /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so:undefined 引用ts_fd' /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to
ts_config&#39; /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so:undefined 参考inflateReset' /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to
deflateReset&#39; /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so:undefined 参考ts_close' /usr/local/Trolltech/QtEmbedded-4.8.6-arm/lib/libQtGui.so: undefined reference to
ts_read&#39; collect2:错误:ld返回1退出状态 Makefile:103:目标的配方&#39; helloqt&#39;失败了:*** [helloqt] 错误1 root @ ubuntu:/ home / fgit / helloqt#
我的ubutu中有这个lib (我有x64 ubuntu14.04并从该文件安装compuler并安装qtcreator,qtdeclarative5-dev) 如何解决这些错误?