freebsd gmake lib错误:未定义引用

时间:2017-09-26 08:20:00

标签: c++ c++11 boost stl freebsd

我们使用freebsd gcc编译器。说了很多错误之后我用过的cmake命令。

有:

OBJDIR/GAuthServer.o: In function `GAuthServer::OnMySQLConnect(std::weak_ptr<GAuthServer>, boost::system::error_code const&)':
/mainline/Server/auth/src/GAuthServer.cpp:301: undefined reference to `NetClient::Connect(std::string const&, unsigned short)'
/mainline/Server/auth/src/GAuthServer.cpp:303: undefined reference to `NetServer::Bind(std::string const&, unsigned short)'
../../../Extern/lib/libFoxNet.a(NetService.cpp.o): In function `~system_error':
/usr/local/include/boost/system/system_error.hpp:47: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()'
../../../Extern/lib/libFoxNet.a(NetService.cpp.o): In function `system_error':
/usr/local/include/boost/system/system_error.hpp:34: undefined reference to `std::runtime_error::runtime_error(char const*)'
/usr/local/include/boost/system/system_error.hpp:22: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::basic_string(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)'
/usr/local/include/boost/system/system_error.hpp:28: undefined reference to `std::runtime_error::runtime_error(char const*)'
../../../Extern/lib/libFoxNet.a(NetServer.cpp.o): In function `shared_ptr':
/usr/include/c++/v1/memory:4292: undefined reference to `std::__1::__shared_weak_count::__add_shared()'
../../../Extern/lib/libFoxNet.a(NetServer.cpp.o): In function `~shared_ptr':
/usr/include/c++/v1/memory:4605: undefined reference to `std::__1::__shared_weak_count::__release_shared()'
/usr/include/c++/v1/memory:4605: undefined reference to `std::__1::__shared_weak_count::__release_shared()'
../../../Extern/lib/libFoxNet.a(NetServer.cpp.o): In function `std::__1::weak_ptr<NetServer>::lock() const':
/usr/include/c++/v1/memory:5350: undefined reference to `std::__1::__shared_weak_count::lock()'
../../../Extern/lib/libFoxNet.a(NetServer.cpp.o): In function `~weak_ptr':
/usr/include/c++/v1/memory:5238: undefined reference to `std::__1::__shared_weak_count::__release_weak()'
../../../Extern/lib/libFoxNet.a(NetServer.cpp.o): In function `shared_ptr<NetServer>':
/usr/include/c++/v1/memory:5335: undefined reference to `std::__1::__shared_weak_count::lock()'
/usr/include/c++/v1/memory:5339: undefined reference to `typeinfo for std::__1::bad_weak_ptr'
/usr/include/c++/v1/memory:5339: undefined reference to `std::__1::bad_weak_ptr::~bad_weak_ptr()'
../../../Extern/lib/libFoxNet.a(NetServer.cpp.o): In function `bad_weak_ptr':
/usr/include/c++/v1/memory:3678: undefined reference to `vtable for std::__1::bad_weak_ptr'
../../../Extern/lib/libFoxNet.a(NetServer.cpp.o): In function `shared_ptr':
/usr/include/c++/v1/memory:4292: undefined reference to `std::__1::__shared_weak_count::__add_shared()'
/usr/include/c++/v1/memory:4292: undefined reference to `std::__1::__shared_weak_count::__add_shared()'
/usr/include/c++/v1/memory:4292: undefined reference to `std::__1::__shared_weak_count::__add_shared()'
/usr/include/c++/v1/memory:4292: undefined reference to `std::__1::__shared_weak_count::__add_shared()'
../../../Extern/lib/libFoxNet.a(NetServer.cpp.o): In function `weak_ptr<NetServer>':
/usr/include/c++/v1/memory:5191: undefined reference to `std::__1::__shared_weak_count::__add_weak()'
../../../Extern/lib/libFoxNet.a(NetServer.cpp.o): In function `shared_ptr':
/usr/include/c++/v1/memory:4292: undefined reference to `std::__1::__shared_weak_count::__add_shared()'
../../../Extern/lib/libFoxNet.a(NetClient.cpp.o): In function `NetClient::Connect(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned short)':
/home/rubinum-game/extern/thirdparty_src/FoxNet/src/NetClient.cpp:9: undefined reference to `std::__1::to_string(int)'
/home/rubinum-game/extern/thirdparty_src/FoxNet/src/NetClient.cpp:9: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()'
/home/rubinum-game/extern/thirdparty_src/FoxNet/src/NetClient.cpp:9: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()'
../../../Extern/lib/libFoxNet.a(NetClient.cpp.o): In function `shared_ptr<NetPeer>':
/usr/include/c++/v1/memory:4282: undefined reference to `std::__1::__shared_weak_count::__add_shared()'
/usr/include/c++/v1/memory:4282: undefined reference to `std::__1::__shared_weak_count::__add_shared()'
../../../Extern/lib/libFoxNet.a(NetClient.cpp.o): In function `basic_resolver_query':
/usr/local/include/boost/asio/ip/basic_resolver_query.hpp:151: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::basic_string(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)'
/usr/local/include/boost/asio/ip/basic_resolver_query.hpp:152: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::basic_string(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)'
/usr/local/include/boost/asio/ip/basic_resolver_query.hpp:163: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()'
/usr/local/include/boost/asio/ip/basic_resolver_query.hpp:163: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()'
../../../Extern/lib/libFoxNet.a(NetClient.cpp.o): In function `~basic_resolver_query':
/usr/local/include/boost/asio/ip/basic_resolver_query.hpp:39: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()'
/usr/local/include/boost/asio/ip/basic_resolver_query.hpp:39: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()'
/usr/local/include/boost/asio/ip/basic_resolver_query.hpp:39: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()'
../../../Extern/lib/libFoxNet.a(NetClient.cpp.o): In function `~shared_ptr':
/usr/include/c++/v1/memory:4605: undefined reference to `std::__1::__shared_weak_count::__release_shared()'
../../../Extern/lib/libFoxNet.a(NetClient.cpp.o): In function `std::__1::weak_ptr<NetClient>::lock() const':
/usr/include/c++/v1/memory:5350: undefined reference to `std::__1::__shared_weak_count::lock()'
../../../Extern/lib/libFoxNet.a(NetClient.cpp.o): In function `boost::date_time::c_time::gmtime(int const*, tm*)':
/usr/local/include/boost/date_time/c_time.hpp:88: undefined reference to `std::runtime_error::runtime_error(char const*)'
../../../Extern/lib/libFoxNet.a(NetClient.cpp.o): In function `basic_string':
/usr/include/c++/v1/string:2053: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__init(char const*, unsigned int)'
../../../Extern/lib/libFoxNet.a(NetClient.cpp.o): In function `date':
/usr/local/include/boost/date_time/gregorian/greg_date.hpp:59: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()'
../../../Extern/lib/libFoxNet.a(NetClient.cpp.o): In function `basic_string':
/usr/include/c++/v1/string:2053: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__init(char const*, unsigned int)'
../../../Extern/lib/libFoxNet.a(NetClient.cpp.o): In function `out_of_range':
/usr/include/c++/v1/stdexcept:132: undefined reference to `std::logic_error::logic_error(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)'
../../../Extern/lib/libFoxNet.a(NetClient.cpp.o): In function `bad_year':
/usr/local/include/boost/date_time/gregorian/greg_year.hpp:23: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()'
/usr/local/include/boost/date_time/gregorian/greg_year.hpp:23: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()'
../../../Extern/lib/libFoxNet.a(NetClient.cpp.o): In function `out_of_range':
/usr/include/c++/v1/stdexcept:128: undefined reference to `std::logic_error::logic_error(std::logic_error const&)'
../../../Extern/lib/libFoxNet.a(NetClient.cpp.o): In function `basic_string':
/usr/include/c++/v1/string:2053: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__init(char const*, unsigned int)'
../../../Extern/lib/libFoxNet.a(NetClient.cpp.o): In function `out_of_range':
/usr/include/c++/v1/stdexcept:132: undefined reference to `std::logic_error::logic_error(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)'
../../../Extern/lib/libFoxNet.a(NetClient.cpp.o): In function `bad_month':
/usr/local/include/boost/date_time/gregorian/greg_month.hpp:46: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()'
/usr/local/include/boost/date_time/gregorian/greg_month.hpp:46: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()'
../../../Extern/lib/libFoxNet.a(NetClient.cpp.o): In function `basic_string':
/usr/include/c++/v1/string:2053: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__init(char const*, unsigned int)'
../../../Extern/lib/libFoxNet.a(NetClient.cpp.o): In function `out_of_range':
/usr/include/c++/v1/stdexcept:132: undefined reference to `std::logic_error::logic_error(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)'
../../../Extern/lib/libFoxNet.a(NetClient.cpp.o): In function `bad_day_of_month':
/usr/local/include/boost/date_time/gregorian/greg_day.hpp:23: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()'
/usr/local/include/boost/date_time/gregorian/greg_day.hpp:23: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()'
../../../Extern/lib/libFoxNet.a(NetClient.cpp.o): In function `out_of_range':
/usr/include/c++/v1/stdexcept:132: undefined reference to `std::logic_error::logic_error(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)'
../../../Extern/lib/libFoxNet.a(NetClient.cpp.o): In function `boost::asio::detail::resolver_service<boost::asio::ip::tcp>::resolve(boost::shared_ptr<void>&, boost::asio::ip::basic_resolver_query<boost::asio::ip::tcp> const&, boost::system::error_code&)':
/usr/local/include/boost/asio/detail/resolver_service.hpp:64: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()'
/usr/local/include/boost/asio/detail/resolver_service.hpp:64: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()'
/usr/local/include/boost/asio/detail/resolver_service.hpp:68: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()'
/usr/local/include/boost/asio/detail/resolver_service.hpp:68: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()'
/usr/local/include/boost/asio/detail/resolver_service.hpp:64: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()'
../../../Extern/lib/libFoxNet.a(NetClient.cpp.o):/usr/local/include/boost/asio/detail/resolver_service.hpp:64: more undefined references to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()' follow
../../../Extern/lib/libFoxNet.a(NetClient.cpp.o): In function `boost::asio::ip::basic_resolver_query<boost::asio::ip::tcp>::host_name() const':
/usr/local/include/boost/asio/ip/basic_resolver_query.hpp:225: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::basic_string(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)'
../../../Extern/lib/libFoxNet.a(NetClient.cpp.o): In function `boost::asio::ip::basic_resolver_query<boost::asio::ip::tcp>::service_name() const':
/usr/local/include/boost/asio/ip/basic_resolver_query.hpp:231: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::basic_string(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)'
../../../Extern/lib/libFoxNet.a(NetClient.cpp.o): In function `boost::asio::ip::basic_resolver_iterator<boost::asio::ip::tcp>::create(addrinfo*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)':
/usr/local/include/boost/asio/ip/basic_resolver_iterator.hpp:85: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::basic_string(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)'
../../../Extern/lib/libFoxNet.a(NetClient.cpp.o): In function `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::operator=(char const*)':
/usr/include/c++/v1/string:1422: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::assign(char const*)'
../../../Extern/lib/libFoxNet.a(NetClient.cpp.o): In function `boost::asio::ip::basic_resolver_iterator<boost::asio::ip::tcp>::create(addrinfo*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)':
/usr/local/include/boost/asio/ip/basic_resolver_iterator.hpp:109: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()'
/usr/local/include/boost/asio/ip/basic_resolver_iterator.hpp:109: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()'
../../../Extern/lib/libFoxNet.a(NetClient.cpp.o): In function `basic_resolver_entry':
/usr/local/include/boost/asio/ip/basic_resolver_entry.hpp:55: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::basic_string(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)'
/usr/local/include/boost/asio/ip/basic_resolver_entry.hpp:56: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::basic_string(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)'
/usr/local/include/boost/asio/ip/basic_resolver_entry.hpp:58: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()'
../../../Extern/lib/libFoxNet.a(NetClient.cpp.o): In function `~basic_resolver_entry':
/usr/local/include/boost/asio/ip/basic_resolver_entry.hpp:37: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()'
/usr/local/include/boost/asio/ip/basic_resolver_entry.hpp:37: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()'
/usr/local/include/boost/asio/ip/basic_resolver_entry.hpp:37: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()'
../../../Extern/lib/libFoxNet.a(NetClient.cpp.o): In function `std::__1::vector<boost::asio::ip::basic_resolver_entry<boost::asio::ip::tcp>, std::__1::allocator<boost::asio::ip::basic_resolver_entry<boost::asio::ip::tcp> > >::__recommend(unsigned int) const':
/usr/include/c++/v1/vector:962: undefined reference to `std::__1::__vector_base_common<true>::__throw_length_error() const'
../../../Extern/lib/libFoxNet.a(NetClient.cpp.o): In function `basic_resolver_entry':
/usr/local/include/boost/asio/ip/basic_resolver_entry.hpp:37: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::basic_string(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)'
/usr/local/include/boost/asio/ip/basic_resolver_entry.hpp:37: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::basic_string(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)'
/usr/local/include/boost/asio/ip/basic_resolver_entry.hpp:37: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()'
../../../Extern/lib/libFoxNet.a(NetClient.cpp.o): In function `shared_ptr<NetPeer>':
/usr/include/c++/v1/memory:5335: undefined reference to `std::__1::__shared_weak_count::lock()'
/usr/include/c++/v1/memory:5339: undefined reference to `typeinfo for std::__1::bad_weak_ptr'
/usr/include/c++/v1/memory:5339: undefined reference to `std::__1::bad_weak_ptr::~bad_weak_ptr()'
../../../Extern/lib/libFoxNet.a(NetClient.cpp.o): In function `shared_ptr':
/usr/include/c++/v1/memory:4292: undefined reference to `std::__1::__shared_weak_count::__add_shared()'
/usr/include/c++/v1/memory:4292: undefined reference to `std::__1::__shared_weak_count::__add_shared()'
../../../Extern/lib/libFoxNet.a(NetClient.cpp.o): In function `std::__1::vector<boost::asio::detail::timer_queue<boost::asio::detail::forwarding_posix_time_traits>::heap_entry, std::__1::allocator<boost::asio::detail::timer_queue<boost::asio::detail::forwarding_posix_time_traits>::heap_entry> >::__recommend(unsigned int) const':
/usr/include/c++/v1/vector:962: undefined reference to `std::__1::__vector_base_common<true>::__throw_length_error() const'
../../../Extern/lib/libFoxNet.a(NetClient.cpp.o): In function `weak_ptr<NetClient>':
/usr/include/c++/v1/memory:5191: undefined reference to `std::__1::__shared_weak_count::__add_weak()'
../../../Extern/lib/libFoxNet.a(NetClient.cpp.o): In function `~weak_ptr':
/usr/include/c++/v1/memory:5238: undefined reference to `std::__1::__shared_weak_count::__release_weak()'
../../../Extern/lib/libFoxNet.a(NetPeer.cpp.o): In function `NetPeer':
/home/rubinum-game/extern/thirdparty_src/FoxNet/src/NetPeer.cpp:3: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()'
../../../Extern/lib/libFoxNet.a(NetPeer.cpp.o): In function `~NetPeer':
/home/rubinum-game/extern/thirdparty_src/FoxNet/src/NetPeer.cpp:4: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()'
/home/rubinum-game/extern/thirdparty_src/FoxNet/src/NetPeer.cpp:4: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()'
../../../Extern/lib/libFoxNet.a(NetPeer.cpp.o): In function `NetPeer::GetIP() const':
/home/rubinum-game/extern/thirdparty_src/FoxNet/src/NetPeer.cpp:12: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::operator=(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)'
/home/rubinum-game/extern/thirdparty_src/FoxNet/src/NetPeer.cpp:12: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()'
/home/rubinum-game/extern/thirdparty_src/FoxNet/src/NetPeer.cpp:12: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()'
../../../Extern/lib/libFoxNet.a(NetPeer.cpp.o): In function `shared_ptr<const NetPeer>':
/usr/include/c++/v1/memory:4282: undefined reference to `std::__1::__shared_weak_count::__add_shared()'
../../../Extern/lib/libFoxNet.a(NetPeer.cpp.o): In function `~shared_ptr':
/usr/include/c++/v1/memory:4605: undefined reference to `std::__1::__shared_weak_count::__release_shared()'
../../../Extern/lib/libFoxNet.a(NetPeer.cpp.o): In function `std::__1::weak_ptr<NetPeer>::lock() const':
/usr/include/c++/v1/memory:5350: undefined reference to `std::__1::__shared_weak_count::lock()'
../../../Extern/lib/libFoxNet.a(NetPeer.cpp.o): In function `std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >::allocate(unsigned int)':
/usr/include/c++/v1/vector:929: undefined reference to `std::__1::__vector_base_common<true>::__throw_length_error() const'
../../../Extern/lib/libFoxNet.a(NetPeer.cpp.o): In function `~weak_ptr':
/usr/include/c++/v1/memory:5238: undefined reference to `std::__1::__shared_weak_count::__release_weak()'
../../../Extern/lib/libFoxNet.a(NetPeer.cpp.o): In function `shared_ptr<NetPeer>':
/usr/include/c++/v1/memory:5335: undefined reference to `std::__1::__shared_weak_count::lock()'
/usr/include/c++/v1/memory:5339: undefined reference to `typeinfo for std::__1::bad_weak_ptr'
/usr/include/c++/v1/memory:5339: undefined reference to `std::__1::bad_weak_ptr::~bad_weak_ptr()'
../../../Extern/lib/libFoxNet.a(NetPeer.cpp.o): In function `weak_ptr<NetPeer>':
/usr/include/c++/v1/memory:5191: undefined reference to `std::__1::__shared_weak_count::__add_weak()'
/usr/include/c++/v1/memory:5191: undefined reference to `std::__1::__shared_weak_count::__add_weak()'
collect2: error: ld returned 1 exit status
gmake: *** [Makefile:61: ../auth] Error 1

1 个答案:

答案 0 :(得分:0)

FreeBSD上的默认C ++标准库是libc++,默认编译器是clang。您的gcc似乎选择libc++标题,但链接libstdc++

使用基本编译器编译代码,或将-Wl,-rpath=/usr/local/lib/gcc{5,6,7}传递给gcc。并确保您从ports / packages安装了gcc。