Clang++ -stdlib=libc++ приводит к неопределенной ссылке ⇐ C++
-
Anonymous
Clang++ -stdlib=libc++ приводит к неопределенной ссылке
Why am I getting the following linker error when using clang with libc++:
$ clang++ -stdlib=libc++ po.cxx -lpoppler /tmp/po-QqlXGY.o: In function `main': po.cxx:(.text+0x33): undefined reference to `Dict::lookup(char*, Object*, std::__1::set*)' clang: error: linker command failed with exit code 1 (use -v to see invocation) Where:
$ nm -D /usr/lib/x86_64-linux-gnu/libpoppler.so | grep lookup | c++filt| grep \ Dict::lookup\( 00000000000c1870 T Dict::lookup(char*, Object*, std::set*) Code is simply:
#include int main() { Dict *infoDict; Object obj; infoDict->lookup((char*)"key", &obj); return 0; }
Источник: https://stackoverflow.com/questions/184 ... -reference
Why am I getting the following linker error when using clang with libc++:
$ clang++ -stdlib=libc++ po.cxx -lpoppler /tmp/po-QqlXGY.o: In function `main': po.cxx:(.text+0x33): undefined reference to `Dict::lookup(char*, Object*, std::__1::set*)' clang: error: linker command failed with exit code 1 (use -v to see invocation) Where:
$ nm -D /usr/lib/x86_64-linux-gnu/libpoppler.so | grep lookup | c++filt| grep \ Dict::lookup\( 00000000000c1870 T Dict::lookup(char*, Object*, std::set*) Code is simply:
#include int main() { Dict *infoDict; Object obj; infoDict->lookup((char*)"key", &obj); return 0; }
Источник: https://stackoverflow.com/questions/184 ... -reference
Мобильная версия