[英]Qt object not running in ubuntu 14.04
I have an application (to test) in Qt4 to start learning, but I can't even execute the object I created. 我在Qt4中有一个(测试)应用程序来开始学习,但是我什至无法执行我创建的对象。 First of all, the Qt version I have is:
首先,我拥有的Qt版本是:
user@ubuntu:~/m_work/tests/qt1$ qmake --version
QMake version 2.01a
Using Qt version 4.8.6 in /usr/lib/x86_64-linux-gnu
Same output if I run the command qmake-qt4 --version
如果运行命令
qmake-qt4 --version
输出相同
I have a file called main.cpp
with this content: 我有一个名为
main.cpp
的文件,其中包含以下内容:
#include <QApplication>
#include <QPushButton>
int main(int argc, char **argv)
{
QApplication app(argc, argv);
QPushButton button("Hello world !");
button.show();
return app.exec();
}
The commands I execute to compile are: 我执行的编译命令是:
qmake -project
qmake
make
chmod 755 main.o
./main
And the error I get after the last command: 最后一条命令后出现的错误:
bash: ./main.o: cannot execute binary file: Exec format error
The architecture of my laptop is x64, so as far as I know, it should work. 我的笔记本电脑的体系结构是x64,据我所知它应该可以工作。
Hope you have some information you could tell me! 希望您能告诉我一些信息!
如果我是对的,您应该尝试
./qt1
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.