前文
- ubuntu下, 同一份代码, 使用
gcc
和clang
编译结果不相同。 gcc 编译结果, 生成的程序为type
为 shared libary, 而clang
编译生成的程序的type 为executeable
.
解决方案
- 为
cmakelists.txt
脚本增加如下脚本
set(CMAKE_CXX_FLAGS "-no-pie")
set(CMAKE_C_FLAGS "-no-pie")
搞定
- executeable library shared cmake gccexecuteable library shared cmake shared file directory libraries shared file libraries loading glibcxx library unable shared jenkins library share shared libraries loading libxml2 shared permission libraries loading shared libraries libcrypto bcftools shared libreadline libraries loading tool-cmake-find_library