Qt creator交叉编译带图片的程序出现问题,版本4.7 10
::warning:libts-1.0.so.0,neededby/opt/Qt4.7/lib/libQtGui.so,notfound(tryusing-rpathor...
:: warning: libts-1.0.so.0, needed by /opt/Qt4.7/lib/libQtGui.so, not found (try using -rpath or -rpath-link)
:: warning: libpng14.so.14, needed by /opt/Qt4.7/lib/libQtGui.so, not found (try using -rpath or -rpath-link)
:: warning: libz.so.1, needed by /opt/Qt4.7/lib/libQtGui.so, not found (try using -rpath or -rpath-link)
出现好多类似这样的;
/opt/Qt4.7/lib/libQtGui.so:: error: undefined reference to `png_get_tRNS@PNG14_0'
/opt/Qt4.7/lib/libQtGui.so:: error: undefined reference to `png_set_bgr@PNG14_0'
/opt/Qt4.7/lib/libQtGui.so:: error: undefined reference to `png_set_packing@PNG14_0'
/opt/Qt4.7/lib/libQtGui.so:: error: undefined reference to `png_destroy_read_struct@PNG14_0'
/opt/Qt4.7/lib/libQtCore.so:: error: undefined reference to `uncompress'
:: error: collect2: ld returned 1 exit status
设置应该是没错的.
我以为是缺少那几个库文件,但是去网上搜没看到那几个库文件啊,libpng14.so.14,libz.so.1,libts-1.0.so.0都没有.
我的/Qt4.7/mkspecs/qws/linux-arm-g++/qmake.conf是这样子的:
#
# qmake configuration for building with arm-linux-g++
#
include(../../common/g++.conf)
include(../../common/linux.conf)
include(../../common/qws.conf)
# modifications to g++.conf
QMAKE_CC = arm-linux-gcc -lts -lpng
QMAKE_CXX = arm-linux-g++ -lts -lpng
QMAKE_LINK = arm-linux-g++ -lts -lpng
QMAKE_LINK_SHLIB = arm-linux-g++ -lts -lpng
# modifications to linux.conf
QMAKE_AR = arm-linux-ar cqs
QMAKE_OBJCOPY = arm-linux-objcopy
QMAKE_STRIP = arm-linux-strip
load(qt_config)
我不知道该怎么改路径链接.
求各位大神相助啊. 展开
:: warning: libpng14.so.14, needed by /opt/Qt4.7/lib/libQtGui.so, not found (try using -rpath or -rpath-link)
:: warning: libz.so.1, needed by /opt/Qt4.7/lib/libQtGui.so, not found (try using -rpath or -rpath-link)
出现好多类似这样的;
/opt/Qt4.7/lib/libQtGui.so:: error: undefined reference to `png_get_tRNS@PNG14_0'
/opt/Qt4.7/lib/libQtGui.so:: error: undefined reference to `png_set_bgr@PNG14_0'
/opt/Qt4.7/lib/libQtGui.so:: error: undefined reference to `png_set_packing@PNG14_0'
/opt/Qt4.7/lib/libQtGui.so:: error: undefined reference to `png_destroy_read_struct@PNG14_0'
/opt/Qt4.7/lib/libQtCore.so:: error: undefined reference to `uncompress'
:: error: collect2: ld returned 1 exit status
设置应该是没错的.
我以为是缺少那几个库文件,但是去网上搜没看到那几个库文件啊,libpng14.so.14,libz.so.1,libts-1.0.so.0都没有.
我的/Qt4.7/mkspecs/qws/linux-arm-g++/qmake.conf是这样子的:
#
# qmake configuration for building with arm-linux-g++
#
include(../../common/g++.conf)
include(../../common/linux.conf)
include(../../common/qws.conf)
# modifications to g++.conf
QMAKE_CC = arm-linux-gcc -lts -lpng
QMAKE_CXX = arm-linux-g++ -lts -lpng
QMAKE_LINK = arm-linux-g++ -lts -lpng
QMAKE_LINK_SHLIB = arm-linux-g++ -lts -lpng
# modifications to linux.conf
QMAKE_AR = arm-linux-ar cqs
QMAKE_OBJCOPY = arm-linux-objcopy
QMAKE_STRIP = arm-linux-strip
load(qt_config)
我不知道该怎么改路径链接.
求各位大神相助啊. 展开
1个回答
展开全部
找不到 libQtGui.so 这个库, 添加环境变量 LIBRARY_PATH=/opt/Qt4.7/lib 试试
另外你使是用 arm-linux-gcc 编译程序, 需要保证 QT 下的 libQtGui.so 库也是用 arm-linux-gcc 编译的, 否则编译链接会出问题
另外你使是用 arm-linux-gcc 编译程序, 需要保证 QT 下的 libQtGui.so 库也是用 arm-linux-gcc 编译的, 否则编译链接会出问题
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |