我已编译带有标志的libstd ++:
../gcc-gcc-5_4_0-release/libstdc++-v3/configure --enable-libstdcxx-threads=yes --host=arm-linux-gnueabihf CFLAGS="-funwind-tables" CPPFLAGS="-O2 -g3 -gdwarf-4 -funwind-tables -lpthread" --prefix=`pwd`/install --enable-version-specific-runtime-libs--enable-tls --disable-multilib
我已设置--enable-libstdcxx-threads = yes,但是使用它时会发生一些错误。
使用静态库
undefined reference to `std::thread::_M_start_thread(std::shared_ptr<std::thread::_Impl_base>, void (*)())'
使用共享库
symbol _ZNSt6thread15_M_start_threadESt10shared_ptrINS_10_Impl_baseEEPFvvE, version GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference