Linux C++

来源:互联网 发布:java语言就业培训 编辑:程序博客网 时间:2024/04/28 22:22
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 unlimited2)取消core dump文件:ulimit -c 03)查看:gdb 程序名 --core=corefile4、windows文件格式转为unix文件格式1)dos2unix