• 15532阅读
  • 3回复

怎样解决try using -rpath or -rpath-link [复制链接]

上一主题 下一主题
离线liyayao
 

只看楼主 倒序阅读 楼主  发表于: 2010-12-20
编译了ARM的QT4.7.然后我测试能不能有没有编译好,就写了一个简单的程序。然后编译,出现了问题
Running build steps for project hello...
Starting: "/YY/qt4.7bet2/bin/qmake" /root/hello/hello.pro -r -spec qws/linux-arm-g++
The process "/YY/qt4.7bet2/bin/qmake" exited normally.
Starting: "/usr/bin/make" -w
make: Entering directory `/root/hello'
/YY/qt4.7bet2/bin/uic mainwindow.ui -o ui_mainwindow.h
arm-linux-g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/YY/qt4.7bet2/mkspecs/qws/linux-arm-g++ -I. -I/YY/qt4.7bet2/include/QtCore -I/YY/qt4.7bet2/include/QtNetwork -I/YY/qt4.7bet2/include/QtGui -I/YY/qt4.7bet2/include -I. -I. -o main.o main.cpp
arm-linux-g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/YY/qt4.7bet2/mkspecs/qws/linux-arm-g++ -I. -I/YY/qt4.7bet2/include/QtCore -I/YY/qt4.7bet2/include/QtNetwork -I/YY/qt4.7bet2/include/QtGui -I/YY/qt4.7bet2/include -I. -I. -o mainwindow.o mainwindow.cpp
/YY/qt4.7bet2/bin/moc -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/YY/qt4.7bet2/mkspecs/qws/linux-arm-g++ -I. -I/YY/qt4.7bet2/include/QtCore -I/YY/qt4.7bet2/include/QtNetwork -I/YY/qt4.7bet2/include/QtGui -I/YY/qt4.7bet2/include -I. -I. mainwindow.h -o moc_mainwindow.cpp
arm-linux-g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/YY/qt4.7bet2/mkspecs/qws/linux-arm-g++ -I. -I/YY/qt4.7bet2/include/QtCore -I/YY/qt4.7bet2/include/QtNetwork -I/YY/qt4.7bet2/include/QtGui -I/YY/qt4.7bet2/include -I. -I. -o moc_mainwindow.o moc_mainwindow.cpp
arm-linux-g++ -Wl,-O1 -Wl,-rpath,/YY/qt4.7bet2/lib -o hello main.o mainwindow.o moc_mainwindow.o    -L/YY/qt4.7bet2/lib -lQtGui -L/myrootfs/usr/lib -L/YY/qt4.7bet2/lib -lQtNetwork -lQtCore -lpthread
make: Leaving directory `/root/hello'
/opt/FriendlyARM/toolschain/4.4.3/lib/gcc/arm-none-linux-gnueabi/4.4.3/../../../../arm-none-linux-gnueabi/bin/ld: warning: libgthread-2.0.so.0, needed by /YY/qt4.7bet2/lib/libQtGui.so, not found (try using -rpath or -rpath-link)
/opt/FriendlyARM/toolschain/4.4.3/lib/gcc/arm-none-linux-gnueabi/4.4.3/../../../../arm-none-linux-gnueabi/bin/ld: warning: libglib-2.0.so.0, needed by /YY/qt4.7bet2/lib/libQtGui.so, not found (try using -rpath or -rpath-link)
/opt/FriendlyARM/toolschain/4.4.3/lib/gcc/arm-none-linux-gnueabi/4.4.3/../../../../arm-none-linux-gnueabi/bin/ld: warning: libpng14.so.14, needed by /YY/qt4.7bet2/lib/libQtGui.so, not found (try using -rpath or -rpath-link)
/opt/FriendlyARM/toolschain/4.4.3/lib/gcc/arm-none-linux-gnueabi/4.4.3/../../../../arm-none-linux-gnueabi/bin/ld: warning: libz.so.1, needed by /YY/qt4.7bet2/lib/libQtGui.so, not found (try using -rpath or -rpath-link)
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `deflateInit_'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `deflateInit2_'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_get_tRNS@PNG14_0'
/YY/qt4.7bet2/lib/libQtCore.so: undefined reference to `g_threads_got_initialized'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_set_bgr@PNG14_0'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `compress'
/YY/qt4.7bet2/lib/libQtCore.so: undefined reference to `g_main_context_ref'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_set_packing@PNG14_0'
/YY/qt4.7bet2/lib/libQtCore.so: undefined reference to `g_main_context_unref'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_set_sBIT@PNG14_0'
/YY/qt4.7bet2/lib/libQtCore.so: undefined reference to `g_main_context_default'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_get_text@PNG14_0'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_destroy_read_struct@PNG14_0'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_create_read_struct@PNG14_0'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_set_sig_bytes@PNG14_0'
/YY/qt4.7bet2/lib/libQtCore.so: undefined reference to `uncompress'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_error@PNG14_0'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_set_PLTE@PNG14_0'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_set_error_fn@PNG14_0'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `deflate'
/YY/qt4.7bet2/lib/libQtCore.so: undefined reference to `g_main_context_pending'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_write_chunk@PNG14_0'
/YY/qt4.7bet2/lib/libQtCore.so: undefined reference to `g_thread_init'
/YY/qt4.7bet2/lib/libQtCore.so: undefined reference to `compress2'
/YY/qt4.7bet2/lib/libQtCore.so: undefined reference to `g_source_set_priority'
/YY/qt4.7bet2/lib/libQtCore.so: undefined reference to `g_source_unref'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_get_valid@PNG14_0'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `deflateEnd'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_read_update_info@PNG14_0'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_set_gAMA@PNG14_0'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_set_write_fn@PNG14_0'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_write_info@PNG14_0'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `crc32'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `inflate'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_read_image@PNG14_0'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_set_gray_to_rgb@PNG14_0'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `inflateInit2_'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `g_source_set_can_recurse'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_set_longjmp_fn@PNG14_0'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `g_source_attach'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_get_IHDR@PNG14_0'
/YY/qt4.7bet2/lib/libQtCore.so: undefined reference to `g_main_context_iteration'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_set_pHYs@PNG14_0'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_create_write_struct@PNG14_0'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_get_x_pixels_per_meter@PNG14_0'
/YY/qt4.7bet2/lib/libQtCore.so: undefined reference to `g_source_add_poll'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `inflateEnd'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_read_end@PNG14_0'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_set_IHDR@PNG14_0'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_create_info_struct@PNG14_0'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_get_gAMA@PNG14_0'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_set_gamma@PNG14_0'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_set_filler@PNG14_0'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_get_io_ptr@PNG14_0'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_destroy_write_struct@PNG14_0'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_get_y_pixels_per_meter@PNG14_0'
/YY/qt4.7bet2/lib/libQtCore.so: undefined reference to `g_main_context_new'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_get_PLTE@PNG14_0'
/YY/qt4.7bet2/lib/libQtCore.so: undefined reference to `g_source_remove_poll'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_set_oFFs@PNG14_0'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_get_image_width@PNG14_0'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_get_image_height@PNG14_0'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `g_source_new'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_set_expand@PNG14_0'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_set_read_fn@PNG14_0'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `inflateReset'
/YY/qt4.7bet2/lib/libQtCore.so: undefined reference to `g_main_context_wakeup'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_set_text@PNG14_0'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_write_end@PNG14_0'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_set_strip_16@PNG14_0'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_read_info@PNG14_0'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_write_image@PNG14_0'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_set_invert_mono@PNG14_0'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_set_tRNS@PNG14_0'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `g_source_destroy'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_set_compression_level@PNG14_0'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_set_packswap@PNG14_0'
/YY/qt4.7bet2/lib/libQtGui.so: undefined reference to `png_get_channels@PNG14_0'
collect2: ld returned 1 exit statusmake: *** [hello] Error 1
The process "/usr/bin/make" exited with code %2.
Error while building project hello (target: Desktop)
When executing build step 'Make'


请问,这是出现了什么样的原因呢
离线wangqin0919
只看该作者 1楼 发表于: 2011-09-24
楼主,你的这个问题解决了没有啊,是怎么解决的啊,能不能告诉小妹啊
离线yanzi1225627
只看该作者 2楼 发表于: 2012-04-26
我也遇到了类似的问题,泪奔啊!!!! 谁解决了 告诉我一下啊 我的QQ1603944332
离线yanzi1225627
只看该作者 3楼 发表于: 2012-04-27
其实我的也是这个问题啊 没办法解决吗??
快速回复
限100 字节
 
上一个 下一个