1、链接错误“error while loading shared libraries”的解決方法:
1)在/etc/profile中添加export LD_LIBRARY_PATH=lib所在目录,然后执行source /etc/profile 生效一下
2)在~/.bash_profile中添加export LD_LIBRARY_PATH=lib所在目录,然后执行source ~/.bash_profile 生效一下
3)在/etc/ld.so.conf中加入lib所在的目录,然后执行/sbin/ldconfig –v 生效一下
2、运行错误“symbol lookup error”、“undefined symbol”的解決方法:
1)在使用linux共享库的时候,有很多情况是动态库的函数找不到,这就要使用ldd命令,看动态库是否加载正确
3、设置调试日志:
1)设置core dump文件:ulimit -c unlimited
2)取消core dump文件:ulimit -c 0
3)查看:gdb 程序名 --core=corefile
4、windows文件格式转为unix文件格式
1)dos2unix
Linux C++
最新推荐文章于 2025-03-16 17:18:06 发布