Skip to content
This repository has been archived by the owner on Sep 12, 2018. It is now read-only.

when './build.sh' , /usr/local/lib/libglog.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, #59

Open
ineslyl opened this issue Mar 6, 2018 · 1 comment

Comments

@ineslyl
Copy link

ineslyl commented Mar 6, 2018

[ 71%] Built target gtest_main
[ 78%] Linking CXX executable storage_test
/usr/bin/ld: warning: libgflags.so.2.2, needed by /usr/local/lib/libglog.so, not found (try using -rpath or -rpath-link)
/usr/local/lib/libglog.so: undefined reference to std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@GLIBCXX_3.4.21' /usr/local/lib/libglog.so: undefined reference to vtable for std::__cxx11::basic_ostringstream<char, std::char_traits, std::allocator >@GLIBCXX_3.4.21'
/usr/local/lib/libglog.so: undefined reference to google::FlagRegisterer::FlagRegisterer<int>(char const*, char const*, char const*, int*, int*)' /usr/local/lib/libglog.so: undefined reference to std::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_append(char const*, unsigned long)@GLIBCXX_3.4.21'
/usr/local/lib/libglog.so: undefined reference to std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*)@GLIBCXX_3.4.21' /usr/local/lib/libglog.so: undefined reference to vtable for std::__cxx11::basic_stringbuf<char, std::char_traits, std::allocator >@GLIBCXX_3.4.21'
/usr/local/lib/libglog.so: undefined reference to std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long)@GLIBCXX_3.4.21' /usr/local/lib/libglog.so: undefined reference to std::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_replace_aux(unsigned long, unsigned long, unsigned long, char)@GLIBCXX_3.4.21'
/usr/local/lib/libglog.so: undefined reference to std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::_M_sync(char*, unsigned long, unsigned long)@GLIBCXX_3.4.21' /usr/local/lib/libglog.so: undefined reference to google::FlagRegisterer::FlagRegisterer(char const*, char const*, char const*, bool*, bool*)'
/usr/local/lib/libglog.so: undefined reference to std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_ostringstream()@GLIBCXX_3.4.21' /usr/local/lib/libglog.so: undefined reference to std::__cxx11::basic_string<char, std::char_traits, std::allocator >::compare(char const*) const@GLIBCXX_3.4.21'
/usr/local/lib/libglog.so: undefined reference to VTT for std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4.21' /usr/local/lib/libglog.so: undefined reference to std::__cxx11::basic_string<char, std::char_traits, std::allocator >::~basic_string()@GLIBCXX_3.4.21'
/usr/local/lib/libglog.so: undefined reference to google::FlagRegisterer::FlagRegisterer<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(char const*, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)' /usr/local/lib/libglog.so: undefined reference to std::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_replace(unsigned long, unsigned long, char const*, unsigned long)@GLIBCXX_3.4.21'
collect2: error: ld returned 1 exit status
make[2]: *** [test/storage_test] Error 1
make[1]: *** [test/CMakeFiles/storage_test.dir/all] Error 2
make: *** [all] Error 2

i try to mortify CMakeList.txt OPTION(NO_TEST ON), but i got the same problem.

@ineslyl
Copy link
Author

ineslyl commented Mar 7, 2018

solve it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant