84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
gcc4.9.3编译的库能被gcc4.8链接使用吗? 反过来呢? 低版本的编译器做成的库能被高版本编译器使用吗?
linux上面的包管理器安装的库,在我升级了gcc后依然可以使用,是不是编译器编译了库之后就和编译器没有关系了?只和平台上的运行库之类的有关了?
业精于勤,荒于嬉;行成于思,毁于随。
Lower versions use higher version libraries
如果库的二进制是兼容低版本,自然可以使用
Higher versions use lower version libraries
一般来说都可以
Yes, after the compiler compiles the library, it has nothing to do with the compiler. If you use a library compiled with a new version of gcc, it may be version incompatible with the system's own runtime library.
Check the version of libc/libc++ library
`strings "/lib/libc.so.6" | grep LIBC` `strings "/lib/libstdc++.so.6" | grep LIBC` 把库的路径换成你机器的路径即可
Check the version of the library required by the elf file
`readelf -s ltrace | grep -oP "GLIBC_[\d\.]*" | sort | uniq` 把`-s`后面的文件换成你的程序
Lower versions use higher version libraries
Higher versions use lower version libraries
Yes, after the compiler compiles the library, it has nothing to do with the compiler. If you use a library compiled with a new version of gcc, it may be version incompatible with the system's own runtime library.
Check the version of libc/libc++ library
Check the version of the library required by the elf file