刘志华 发表于 2012-11-9 10:16:07

qtcreator点击run按钮出不来hello的框图界面

# ./qt-creator-linux-x86-opensource-1.3.0.bin 安装好qtcreator后,配置qtcreator如下:

打开hello_cn.pro,点击run出现Starting /opt/EmbedSky/qt-4.5/pro/hello_cn/hello_cn...
                                                 /opt/EmbedSky/qt-4.5/pro/hello_cn/hello_cn exited with code 255

# qmake -v
QMake version 2.01a
Using Qt version 4.5.0 in /opt/EmbedSky/qt-4.5/__install/arm//lib
# which qmake
/opt/EmbedSky/qt-4.5/__install/arm/bin/qmake
请问各位大侠怎么解决?

梦来是缘 发表于 2012-11-9 10:35:13

不点击run   你在hello_cn目录下执行./x86_project   然后make   最后执行./hello_cn

刘志华 发表于 2012-11-9 10:42:04

梦来是缘 发表于 2012-11-9 10:35 static/image/common/back.gif
不点击run   你在hello_cn目录下执行./x86_project   然后make   最后执行./hello_cn

我以前在另外一台电脑上是可以run的,就会出来效果图,可最近在这台电脑上搞了好几天也没搞好,我也用了你的那个方法,可是出现了这个问题
# ./x86_project
./x86_project: line 3: qmake-qt4: command not found
./x86_project: line 4: qmake-qt4: command not found

梦来是缘 发表于 2012-11-9 13:28:03

他说qmake-qt4 命令找不到
你电脑上安装fedora是完全安装的吗

刘志华 发表于 2012-11-9 16:44:06

梦来是缘 发表于 2012-11-9 13:28 static/image/common/back.gif
他说qmake-qt4 命令找不到
你电脑上安装fedora是完全安装的吗

我搞了一上午找到qmake-qt4了,然后用你上面那个方法编译完之后,执行hello
# ./hello
QWSSocket::connectToLocalFile could not connect:: Connection refused
QWSSocket::connectToLocalFile could not connect:: Connection refused
QWSSocket::connectToLocalFile could not connect:: Connection refused
QWSSocket::connectToLocalFile could not connect:: Connection refused
QWSSocket::connectToLocalFile could not connect:: Connection refused
QWSSocket::connectToLocalFile could not connect:: Connection refused
No Qt for Embedded Linux server appears to be running.
If you want to run this program as a server,
add the "-qws" command-line option.
# ./hello -qws
QScreenLinuxFb::connect: No such file or directory
Error opening framebuffer device /dev/fb0
QScreenLinuxFb::connect: No such file or directory
Error opening framebuffer device /dev/fb0
QScreenLinuxFb::connect: No such file or directory
Error opening framebuffer device /dev/fb0
QScreenLinuxFb::connect: No such file or directory
Error opening framebuffer device /dev/fb0
QScreenLinuxFb::connect: No such file or directory
Error opening framebuffer device /dev/fb0
QScreenLinuxFb::connect: No such file or directory
Error opening framebuffer device /dev/fb0
QScreenLinuxFb::connect: No such file or directory
Error opening framebuffer device /dev/fb0
QScreenLinuxFb::connect: No such file or directory
Error opening framebuffer device /dev/fb0
Segmentation fault
# qvfb
bash: qvfb: command not found
真是不知道什么原因了?

亚瑟王 发表于 2012-11-10 11:16:14

刘志华 发表于 2012-11-9 16:44 static/image/common/back.gif
我搞了一上午找到qmake-qt4了,然后用你上面那个方法编译完之后,执行hello
# ./ ...

1、qvfb是qtopia的程序,根据你前面的描述你在编译Qt4,也就是用不到qvfb。
2、你的hello程序里面有什么内容?
3、你的qmake是从哪里来的?

刘志华 发表于 2012-11-10 15:49:41

亚瑟王 发表于 2012-11-10 11:16 static/image/common/back.gif
1、qvfb是qtopia的程序,根据你前面的描述你在编译Qt4,也就是用不到qvfb。
2、你的hello程序里面有什么 ...

是在编译qt4,qmake是天嵌光盘里的qt-embedded-linux-opensource-src-4.5.0_20100601.tar.bz2解压后编译arm版本的qt4里的,/opt/EmbedSky/qt-4.5/__install/arm/qmake,hello的内容是:
#include <QApplication>
#include <QLabel>

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);
    QLabel *label = new QLabel("Hello Qt!");
    label->show();
    return app.exec();
}
这是个很简单的程序,后来我下载了qt-x11-opensource-src-4.3.2.tar.gz,解压安装后用Qt-4.3.2里面的qmake,点击Qtcreator里面的run就可以执行了,出现hello界面,我认为是天嵌Qt4.5里面qmake的问题,很多人都遇到这个问题的!

亚瑟王 发表于 2012-11-10 16:18:59

刘志华 发表于 2012-11-10 15:49 static/image/common/back.gif
是在编译qt4,qmake是天嵌光盘里的qt-embedded-linux-opensource-src-4.5.0_20100601.tar.bz2解压后编译a ...

光盘中编译出来的qmake是针对arm的是在开发板上面运行的。
如果你要编译PC上运行的你需要用PC自带的qmake(针对qt4的那个)或者到qt官网下载qt4的sdk安装之后获取qmake。

wang181671 发表于 2014-2-26 23:29:06

我也遇到同样的问题了,写好代码built的时候就这样了,没有出现效果,代码是正确的。

wang181671 发表于 2014-2-26 23:30:59

亚瑟王 发表于 2012-11-10 16:18
光盘中编译出来的qmake是针对arm的是在开发板上面运行的。
如果你要编译PC上运行的你需要用PC自带的qmak ...

我也遇到同样的问题了,写好代码built的时候就这样了,没有出现效果,代码是正确的。我只是想预览下效果,可以的话在移植到开发板

wang181671 发表于 2014-2-26 23:52:54

亚瑟王 发表于 2012-11-10 16:18
光盘中编译出来的qmake是针对arm的是在开发板上面运行的。
如果你要编译PC上运行的你需要用PC自带的qmak ...

另外i想问下:Failed to execute /linuxrc. Attempting defaults.. 怎么解决,问题详细:http://www.armbbs.net/forum.php?mod=viewthread&tid=18772&extra=谢谢

亚瑟王 发表于 2014-2-27 10:05:01

wang181671 发表于 2014-2-26 23:30
我也遇到同样的问题了,写好代码built的时候就这样了,没有出现效果,代码是正确的。我只是想预览下效果 ...

如果要在PC上预览,需要用X11版本的Qt,我们光盘提供的Qt是针对ARM的,不能直接在PC上运行。
页: [1]
查看完整版本: qtcreator点击run按钮出不来hello的框图界面