找回密码
 立即注册
收起左侧

TQ210移植qt4.8.6时提示QLock::QLock

0
回复
7490
查看
[复制链接]
累计签到:2 天
连续签到:1 天
来源: 2017-3-26 15:38:05 显示全部楼层 |阅读模式
1Qter豆
系统:ubuntu12.04   qt版本:4.8.6   
pc QT位置:/usr/local/Trolltech/qt-everywhere
pc端/etc/profile配置:
#for arm
export QTDIR=/usr/local/Trolltech/qt-everywhere
export PATH=$QTDIR/bin:/source/arm-gcc-4.6.4/binPATH
export LD_LIBRARY_PATH=$QTDIR/libLD_LIBRARY_PATH
export QMAKESPEC=$QTDIR/mkspecs/qws/linux-arm-g++

#echo $PATH 环境变量
/usr/local/Trolltech/qt-everywhere/bin:/source/arm-gcc-4.6.4/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/source/arm-gcc-4.6.4/bin:/source/arm-gcc-4.6.4/bin

ARM版qt位置:
usr/local/Trolltech/qt-everywhere

ARM端/etc/profile配置:
export LD_LIBRARY_PATH=/usr/local/Trolltech/qt-everywhere/lib:/usr/local/lib



qt代码:
#include <QApplication>
#include <QDialog>
#include <QPushButton>
#include <QLineEdit>
int main(int args,char**argv)
{
    QApplication app(args,argv);



    QDialog dlg;
    dlg.resize(400,300);
    dlg.move((1024-400)/2,(768-300)/2);

    QPushButton btn(&dlg);
    btn.resize(100,30);
    btn.move(100,100);
    btn.setText("ok");

    QLineEdit edt(&dlg);
    edt.resize(100,30);
    edt.move(100,200);
    edt.setText("ok");

    dlg.setVisible(true);
    return app.exec();
}


pc使用qte编译后,放入arm平台执行,提示:
[root@S5PV210 hello]# ./hello -qws
QLock:Lock: Cannot create semaphore /tmp/qtembedded-0/QtEmbedded-0 'd' (38, Function not implemented)
Cannot get display lock
Aborted


注:
内核使用3.0.8, System V IPC选项已经开启
qt移植脚本:
./configure -embedded arm -release -qt-mouse-linuxinput \
-opensource -fast -no-accessibility  -qt-sql-sqlite -plugin-sql-sqlite \
-no-scripttools  -multimedia -svg -shared -webkit -webkit-debug  -silent   \
-qt-libpng -qt-libjpeg -no-libtiff  -make libs -nomake tools -nomake examples \
-nomake docs -nomake demo -no-nis -no-cups -iconv -no-dbus -no-openssl -xplatform \
qws/linux-arm-gnueabi-g++ -little-endian -qt-freetype -depths 16,32 -qt-gfx-linuxfb \
-no-gfx-transformed -no-gfx-multiscreen -no-gfx-vnc -no-gfx-qvfb -qt-kbd-linuxinput -no-glib



回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

公告
可以关注我们的微信公众号yafeilinux_friends获取最新动态,或者加入QQ会员群进行交流:190741849、186601429(已满) 我知道了