天嵌 ARM开发社区

 找回密码
 注册
查看: 3345|回复: 4

Qt4做hello应用程序的问题

[复制链接]
348夏日里的春天 发表于 2012-4-18 09:43:04 | 显示全部楼层 |阅读模式
我想在pc下看应用程序的界面,但是编译后运行没有界面跳出来
编译:Compile Out打印信息
Running build steps for project Hello...
Starting: /opt/EmbedSky/qt-4.5/__install/x86/bin/qmake /opt/EmbedSky/qt-4.5/pro/Hello/Hello.pro -spec /opt/EmbedSky/qt-4.5/__install/x86/mkspecs/qws/linux-x86-g++ -r CONFIG+=debug
Exited with code 0.
Starting: /usr/bin/make -w
make: Entering directory `/opt/EmbedSky/qt-4.5/pro/Hello'
/opt/EmbedSky/qt-4.5/__install/x86/bin/uic dialog.ui -o ui_dialog.h
g++ -c -pipe -g -Wall -W -D_REENTRANT -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I../../__install/x86/mkspecs/qws/linux-x86-g++ -I. -I../../__install/x86/include/QtCore -I../../__install/x86/include/QtNetwork -I../../__install/x86/include/QtGui -I../../__install/x86/include -I. -I. -o main.o main.cpp
g++ -c -pipe -g -Wall -W -D_REENTRANT -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I../../__install/x86/mkspecs/qws/linux-x86-g++ -I. -I../../__install/x86/include/QtCore -I../../__install/x86/include/QtNetwork -I../../__install/x86/include/QtGui -I../../__install/x86/include -I. -I. -o dialog.o dialog.cpp
/opt/EmbedSky/qt-4.5/__install/x86//bin/moc -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I../../__install/x86/mkspecs/qws/linux-x86-g++ -I. -I../../__install/x86/include/QtCore -I../../__install/x86/include/QtNetwork -I../../__install/x86/include/QtGui -I../../__install/x86/include -I. -I. dialog.h -o moc_dialog.cpp
g++ -c -pipe -g -Wall -W -D_REENTRANT -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I../../__install/x86/mkspecs/qws/linux-x86-g++ -I. -I../../__install/x86/include/QtCore -I../../__install/x86/include/QtNetwork -I../../__install/x86/include/QtGui -I../../__install/x86/include -I. -I. -o moc_dialog.o moc_dialog.cpp
g++ -Wl,-rpath,/opt/EmbedSky/qt-4.5/__install/x86/lib -o Hello main.o dialog.o moc_dialog.o -L/opt/EmbedSky/qt-4.5/__install/x86//lib -lQtGui -L/opt/EmbedSky/qt-4.5/__install/x86//lib -lpng -lfreetype -pthread -pthread -pthread -pthread -pthread -pthread -lQtNetwork -pthread -pthread -lQtCore -lz -lm -pthread -lgthread-2.0 -lrt -lglib-2.0 -ldl -lpthread
make: Leaving directory `/opt/EmbedSky/qt-4.5/pro/Hello'
Exited with code 0.

运行:Application打印信息
Starting /opt/EmbedSky/qt-4.5/pro/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.
/opt/EmbedSky/qt-4.5/pro/Hello/Hello exited with code 1

运行后Compile Out打印信息变成这样:
Running build steps for project Hello...
Configuration unchanged, skipping QMake step.
Starting: /usr/bin/make -w
make: Entering directory `/opt/EmbedSky/qt-4.5/pro/Hello'
make: Nothing to be done for `first'.
make: Leaving directory `/opt/EmbedSky/qt-4.5/pro/Hello'
Exited with code 0.
TQ-lkp 发表于 2012-4-18 12:01:34 | 显示全部楼层
交叉编绎器没有设置
 楼主| 348夏日里的春天 发表于 2012-4-18 19:35:34 | 显示全部楼层
还是不太清楚,我把操作的图片贴出来

本帖子中包含更多资源

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

x
luzq001 发表于 2012-5-2 22:43:14 | 显示全部楼层
这个问题很简单,你在hello后面加一个“-qws”
孙小北 发表于 2012-5-12 22:17:37 | 显示全部楼层
你的图2怎么没qtinpath???
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

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

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

GMT+8, 2024-9-28 13:15 , Processed in 1.033243 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2020, Tencent Cloud.

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