碰到一个在另个系统上用gcc7.2编译时,怎么也找不到一个日志库log4cxx函数定义的问题,在自己的编译机上一切都是正常的,请教另个同事才发现,另个gcc版本加了with-default-libstdcxx-abi属性
--with-default-libstdcxx-abi=gcc4-compatible
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,go --enable-plugin --enable-initfini-array --disable-libgcj --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux --disable-multilib --with-default-libstdcxx-abi=gcc4-compatible --with-abi=m64 --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --with-target-system-zlib --enable-objc-gc=auto --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-nls --without-included-gettext --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local
大致了解了一下,这个-with-default-libstdcxx-abi=gcc4-compatible大致意思是,指定了gcc4,应该是用老的c++标准来处理string,新的gcc7默认都是用的c11的方式处理,而我的那个库,是在新的gcc上编译好的放上去的,所以编译链接不过
百度真垃圾,啥也搜不到,作恶多端的公司