当前位置: 技术问答>linux和unix
qtopia 下编译HELLO WORD遇到的问题
来源: 互联网 发布时间:2016-09-06
本文导语: 错误提示如下 arm-linux-gcc -o hello hello.o main.o hello_base.o moc_hello_base.o -L/utulinux/qtopia-1.7-tp/qtopia-free-1.7.0/lib -L/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib -lqpe -lqtopia -lqte /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-lin...
错误提示如下
arm-linux-gcc -o hello hello.o main.o hello_base.o moc_hello_base.o -L/utulinux/qtopia-1.7-tp/qtopia-free-1.7.0/lib -L/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib -lqpe -lqtopia -lqte
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/bin/ld: warning: libuuid.so.1, needed by /utulinux/qtopia-1.7-tp/qtopia-free-1.7.0/lib/libqtopia.so, not found (try using -rpath or -rpath-link)
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/bin/ld: warning: libpng12.so.0, needed by /utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so, not found (try using -rpath or -rpath-link)
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_error'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_progressive_read_fn'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_get_x_offset_pixels'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_strip_16'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_compression_level'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_filler'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_create_read_struct'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_sig_bytes'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_interlace_handling'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_read_fn'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_get_x_pixels_per_meter'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_packing'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_get_io_ptr'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_gray_to_rgb'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_process_data'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_oFFs'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_IHDR'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_get_gAMA'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_get_y_offset_pixels'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_get_progressive_ptr'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_tRNS'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_get_valid'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_swap_alpha'
/utulinux/qtopia-1.7-tp/qtopia-free-1.7.0/lib/libqtopia.so: undefined reference to `uuid_generate'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_create_write_struct'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_bgr'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_packswap'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_write_info'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_PLTE'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_invert_mono'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_expand'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_write_chunk'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_write_end'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_get_IHDR'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_write_fn'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_read_info'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_destroy_read_struct'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_write_image'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_read_update_info'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_read_image'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_create_info_struct'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_pHYs'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_progressive_combine_row'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_get_y_pixels_per_meter'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_destroy_write_struct'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_gamma'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_error_fn'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_read_end'
collect2: ld returned 1 exit status
make: *** [hello] 错误 1
arm-linux-gcc -o hello hello.o main.o hello_base.o moc_hello_base.o -L/utulinux/qtopia-1.7-tp/qtopia-free-1.7.0/lib -L/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib -lqpe -lqtopia -lqte
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/bin/ld: warning: libuuid.so.1, needed by /utulinux/qtopia-1.7-tp/qtopia-free-1.7.0/lib/libqtopia.so, not found (try using -rpath or -rpath-link)
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/bin/ld: warning: libpng12.so.0, needed by /utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so, not found (try using -rpath or -rpath-link)
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_error'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_progressive_read_fn'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_get_x_offset_pixels'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_strip_16'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_compression_level'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_filler'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_create_read_struct'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_sig_bytes'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_interlace_handling'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_read_fn'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_get_x_pixels_per_meter'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_packing'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_get_io_ptr'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_gray_to_rgb'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_process_data'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_oFFs'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_IHDR'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_get_gAMA'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_get_y_offset_pixels'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_get_progressive_ptr'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_tRNS'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_get_valid'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_swap_alpha'
/utulinux/qtopia-1.7-tp/qtopia-free-1.7.0/lib/libqtopia.so: undefined reference to `uuid_generate'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_create_write_struct'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_bgr'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_packswap'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_write_info'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_PLTE'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_invert_mono'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_expand'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_write_chunk'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_write_end'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_get_IHDR'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_write_fn'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_read_info'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_destroy_read_struct'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_write_image'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_read_update_info'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_read_image'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_create_info_struct'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_pHYs'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_progressive_combine_row'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_get_y_pixels_per_meter'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_destroy_write_struct'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_gamma'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_set_error_fn'
/utulinux/qtopia-1.7-tp/qt-embedded-2.3.7/lib/libqte.so: undefined reference to `png_read_end'
collect2: ld returned 1 exit status
make: *** [hello] 错误 1
|
环境变量配置好了没?
貌似动态库有问题啊
貌似动态库有问题啊
|
qt 程序是 c++ 程序
你必须用
arm-linux-g++ 去编译。
另外你似乎缺少 :
libuuid.so.1
ibpng12.so.0
所以链接不成功。
你必须用
arm-linux-g++ 去编译。
另外你似乎缺少 :
libuuid.so.1
ibpng12.so.0
所以链接不成功。
|
缺少libqte.so
|
缺少 libpng.so
|
我也遇到过,
解决:将TMAKE_LINK=gcc和TMAKE_LINK_SHLIB=gcc两个后面的gcc改为g++即可(它们在tmake-1.11/lib
/qws/linux-generic-g++/tmake.conf中)
但是我改了后,每次的makefile里的LINK项还是gcc,所以我每次都要把里面的gcc改为g++,然后make就通过了
解决:将TMAKE_LINK=gcc和TMAKE_LINK_SHLIB=gcc两个后面的gcc改为g++即可(它们在tmake-1.11/lib
/qws/linux-generic-g++/tmake.conf中)
但是我改了后,每次的makefile里的LINK项还是gcc,所以我每次都要把里面的gcc改为g++,然后make就通过了
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。