libQtCore.so: undefined reference to `clock_gettime'

来源:互联网 发布:万能五笔有mac版吗 编辑:程序博客网 时间:2024/04/30 01:45
环境: arm qt4.5
问题: libQtCore.so: undefined reference to `clock_gettime'
分析: 应该是找不到库文件  librt.so (POSIX.1b Realtime Extensions library)
解决:
    办法一: 重新编译qt4.5
                  在./configure后 添加参数 -lrt
                  我用的是天嵌embeded,修改arm_qt4.5_build,如下:
echo yes | ../../qt-embedded-linux-opensource-src-4.5.0/configure -prefix /opt/EmbedSky/qt-4.5/__install/arm/ -release -shared -fast -no-largefile -qt-sql-sqlite -no-qt3support -no-xmlpatterns -no-mmx -no-3dnow -no-sse -no-sse2 -no-svg -no-webkit -qt-zlib -qt-gif -qt-libtiff -qt-libpng -qt-libjpeg -make libs -nomake examples -nomake docs -nomake demo -no-nis -no-cups -no-iconv -no-dbus -no-openssl -xplatform qws/linux-arm-g++ -embedded arm -little-endian -qt-freetype -depths 16 -qt-gfx-linuxfb -qt-gfx-transformed -qt-gfx-multiscreen -no-gfx-vnc -no-gfx-qvfb -qt-kbd-usb -no-glib -armfpa -no-mouse-tslib -I/tslib-1.4/inclued -L/tslib-1.4/lib -lrt &&


    办法二: 修改Makefile
                  在makefile中找的   LIBS    ,在其后添加 -lrt 
0 0
原创粉丝点击