开发板终端执行qt程序
# ./qtDemo -qws
报错:
libQtCore.so.4 undefined symbol :g_main_context_push_thread_default
解决方案:
#cd /DVSDK/psp/linux-devkit/arm-none-linux-gnueabi/usr/lib
cp libglib-2.0.so.* /usr/lib(开发板)
报错:
libstdc++.so.6: version `CXXABI_ARM_1.3.3' not found
1、 网上下载/libstdc++.so.6
http://download.csdn.net/detail/DLUTXIE/3603187
2、拷贝到开发板
#cp libstdc++.so.6.0.13 /usr/lib
# ln -s /usr/lib/libstdc++.so.6.0.13 /usr/lib/libstdc++.so.6
备注:之前报的是libstdc++.so.6的相关信息,和这个解决方法大有略同。
推荐文章:
libstdc++.so.6: version `CXXABI_ARM_1.3.3' not found
执行strings /usr/lib/libstdc++.so.6 | grep CXXABI_ARM_1.3.3
返回结果没有CXXABI_ARM_1.3.3
执行ls-l /usr/lib/libstdc++.so.6
发现/usr/lib/libstdc++.so.6 -> /usr/lib/libstdc++.so.6.0.8,
如果是GLIBCXX_3.4.9 需要使用libstdc++.so.6.0.10
如果是CXXABI_ARM_1.3.3 需要使用libstdc++.so.6.0.13
libstdc++.so.6.0.13下载地址:
http://download.csdn.net/detail/DLUTXIE/3603187
从网上下载这个文件,然后拔/usr/lib/libstdc++.so.6 -> /usr/lib/libstdc++.so.6.0.8软链接删除,
rm -rf libstdc++.so.6
重新做 ln -s /usr/lib/libstdc++.so.6.0.13 /usr/lib/libstdc++.so.6I just installed QtSDK 1.2 on my redhat enterprise linux 5.6. While compiling a QT program, I got the following errors:
[root@stack example1]# make
g++ -m64 -Wl,-O1 -Wl,-rpath,/opt/QtSDK/Desktop/Qt/4.8.0/gcc/lib -o example1 fac1.o -L/opt/QtSDK/Desktop/Qt/4.8.0/gcc/lib -lQtGui -lQtCore -lpthread
/opt/QtSDK/Desktop/Qt/4.8.0/gcc/lib/libQtCore.so: undefined reference to `g_main_context_push_thread_default'
/opt/QtSDK/Desktop/Qt/4.8.0/gcc/lib/libQtCore.so: undefined reference to `inotify_init1@GLIBC_2.9'
/opt/QtSDK/Desktop/Qt/4.8.0/gcc/lib/libQtGui.so: undefined reference to `pipe2@GLIBC_2.9'
/opt/QtSDK/Desktop/Qt/4.8.0/gcc/lib/libQtCore.so: undefined reference to `g_main_context_pop_thread_default'
/opt/QtSDK/Desktop/Qt/4.8.0/gcc/lib/libQtGui.so: undefined reference to `FcFreeTypeQueryFace'
/opt/QtSDK/Desktop/Qt/4.8.0/gcc/lib/libQtGui.so: undefined reference to `FT_Library_SetLcdFilter'
/opt/QtSDK/Desktop/Qt/4.8.0/gcc/lib/libQtGui.so: undefined reference to `__longjmp_chk@GLIBC_2.11'
collect2: ld returned 1 exit status
make: *** [example1] Error 1
[root@stack example1]#
It seems g++ compiler uses all correct options. Befor I installed QtSDK 1.2 on rhel 5.6, I had copied libstdc++.so.6.0.10 to /usr/lib64 and relinked libstdc++.so.6 to libstdc++.so.6.0.10, since QtSDK requires GLIBCXX_3.4.9 symbols in the libstdc++ library. I think this may be the source of the problem. But I'm not sure about that. So any advice? Thanks in advance.