天嵌 ARM开发社区

 找回密码
 注册
查看: 5140|回复: 11

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

[复制链接]
刘志华 发表于 2012-11-9 10:16:07 | 显示全部楼层 |阅读模式
[root@localhost tar]# ./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

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

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
梦来是缘 发表于 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
不点击run     你在hello_cn目录下执行./x86_project     然后make   最后执行./hello_cn

我以前在另外一台电脑上是可以run的,就会出来效果图,可最近在这台电脑上搞了好几天也没搞好,我也用了你的那个方法,可是出现了这个问题
[root@localhost hello]# ./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
他说qmake-qt4 命令找不到  
你电脑上安装fedora是完全安装的吗

我搞了一上午找到qmake-qt4了,然后用你上面那个方法编译完之后,执行hello
[root@localhost 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.
[root@localhost hello]# ./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
[root@localhost hello]# qvfb
bash: qvfb: command not found
真是不知道什么原因了?
亚瑟王 发表于 2012-11-10 11:16:14 | 显示全部楼层
刘志华 发表于 2012-11-9 16:44
我搞了一上午找到qmake-qt4了,然后用你上面那个方法编译完之后,执行hello
[root@localhost hello]# ./ ...

1、qvfb是qtopia的程序,根据你前面的描述你在编译Qt4,也就是用不到qvfb。
2、你的hello程序里面有什么内容?
3、你的qmake是从哪里来的?
 楼主| 刘志华 发表于 2012-11-10 15:49:41 | 显示全部楼层
亚瑟王 发表于 2012-11-10 11:16
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
是在编译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? ... id=18772&extra=谢谢
亚瑟王 发表于 2014-2-27 10:05:01 | 显示全部楼层
wang181671 发表于 2014-2-26 23:30
我也遇到同样的问题了,写好代码built的时候就这样了,没有出现效果,代码是正确的。我只是想预览下效果 ...

如果要在PC上预览,需要用X11版本的Qt,我们光盘提供的Qt是针对ARM的,不能直接在PC上运行。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号 )

GMT+8, 2024-3-29 08:00 , Processed in 1.046875 second(s), 23 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表