arm-linux qt交叉编译,qt 交叉编译

tslib-1.4编译通过,安装到/usr/local/下,同时复制了一份到/nand1/tslib-1.4中

进入/home/Raymond/qt-embedded-arm-tslib中

执行:./configure -prefix /nand1/Trolltech/QtEmbeddedARMTSLib -release  -shared -qvfb -make libs  -nomake tools  -make examples  -make docs  -make demo -no-cups  -no-iconv  -no-dbus  -webkit -no-openssl  -xplatform qws/linux-arm-g++  -embedded arm  -little-endian  -qt-freetype  -qt-gfx-linuxfb  -no-gfx-transformed  -no-gfx-multiscreen  -no-gfx-vnc  -no-gfx-qvfb  -qt-kbd-tty  -qt-kbd-usb  -no-glib -qt-mouse-tslib -I/nand1/tslib-1.4/include -L/nand1/tslib-1.4/lib

其中我已经指定了头文件目录和库文件目录

但是在configure过程中,出现如下错误:

The tslib functionality test failed!

You might need to modify the include and library search paths by editing

QMAKE_INCDIR and QMAKE_LIBDIR in

/home/Raymond/qt-embedded-arm-tslib/mkspecs/qws/linux-arm-g++.

请问这个是什么原因?

根据提示,我又将

/home/Raymond/qt-embedded-arm-tslib/mkspecs/qws/linux-arm-g++ /qmake.conf

中添加了QMAKE_INCDIR=/nand1/tslib-1.4/include

QMAKE_LIBDIR=/nand1/tslib-1.4/lib

这两个参数原本在文件中没有,自己编写

回到/home/Raymond/qt-embedded-arm-tslib中

继续我的configure

可是结果还是  The tslib functionality test failed!

You might need to modify the include and library search paths by editing

QMAKE_INCDIR and QMAKE_LIBDIR in

/home/Raymond/qt-embedded-arm-tslib/mkspecs/qws/linux-arm-g++.

请问这是为什么啊,我晕了,谢谢各位朋友帮忙指点

解决办法:

是arm-linux-gcc的路径没有添加到系统变量中。。。

吸取教训 在Shell中输入EXPORT PATH = ....:$PATH 语句时,只在该Shell中可用。

只有

1.修改profile文件:

#vi /etc/profile

在里面加入:

export PATH="$PATH:/opt/au1200_rm/build_tools/bin"

2.修改.bashrc文件:

# vi /root/.bashrc

在里面加入:

export PATH="$PATH:/opt/au1200_rm/build_tools/bin"

才能完成添加

如果经过上述操作后问题仍然无法解决,则换成tslib-1.4重新编译并安装,安装后重新编译qt,问题就得以解决!

如果出错:

/usr/local/arm/4.1.2/bin/../lib/gcc/arm-angstrom-linux-gnueabi/4.1.2/../../../../arm-angstrom-linux-gnueabi/bin/ld: warning: libts-0.0.so.0, needed by /home/stillwater/4.1.2/qt-everywhere-opensource-src-4.6.0/lib/libQtGui.so, not found (try using -rpath or -rpath-link)

/home/stillwater/4.1.2/qt-everywhere-opensource-src-4.6.0/lib/libQtGui.so: undefined reference to `ts_read_raw'

/home/stillwater/4.1.2/qt-everywhere-opensource-src-4.6.0/lib/libQtGui.so: undefined reference to `ts_open'

/home/stillwater/4.1.2/qt-everywhere-opensource-src-4.6.0/lib/libQtGui.so: undefined reference to `ts_fd'

/home/stillwater/4.1.2/qt-everywhere-opensource-src-4.6.0/lib/libQtGui.so: undefined reference to `ts_config'

/home/stillwater/4.1.2/qt-everywhere-opensource-src-4.6.0/lib/libQtGui.so: undefined reference to `ts_close'

/home/stillwater/4.1.2/qt-everywhere-opensource-src-4.6.0/lib/libQtGui.so: undefined reference to `ts_read'

collect2: ld returned 1 exit status

make[2]: *** [deform] Error 1

make[2]: Leaving directory `/home/stillwater/4.1.2/qt-everywhere-opensource-src-4.6.0/demos/deform'

make[1]: *** [sub-deform-make_default] Error 2

make[1]: Leaving directory `/home/stillwater/4.1.2/qt-everywhere-opensource-src-4.6.0/demos'

make: *** [sub-demos-make_default-ordered] Error 2

解决办法:

修改qt-everywhere-opensource-src-4.6.0/mkspecs/qws/linux-arm-g++/qmake.conf 文件(添加lts参数):

QMAKE_CC                = arm-linux-gcc -lts

QMAKE_CXX               = arm-linux-g++ -lts

QMAKE_LINK              = arm-linux-g++ -lts

QMAKE_LINK_SHLIB        = arm-linux-g++ -lts

参考:http://74.125.153.132/search?q=cache:3WzcJeRRj4sJ:nckuhuahua.pixnet.net/blog/post/30066956+libQtGui.so:+undefined+reference+to+%60ts_read%27&cd=3&hl=en&ct=clnk&client=iceweasel-a

你可能感兴趣的:(arm-linux,qt交叉编译)