imaginevision / libssp

MIT License
21 stars 10 forks source link

Need to set "#define _GLIBCXX_USE_CXX11_ABI 0" in libssp_test.cpp to compile with g++ 9.3.0 #10

Open janbraun opened 4 years ago

janbraun commented 4 years ago

When compiling with g++ 9.3.0 linking fails with:

/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/CMakeFiles/example.dir/__/libssp/example/libssp_test.cpp.o: in function `setup(imf::Loop*)':
libssp_test.cpp:(.text+0x1c1): undefined reference to `imf::SspClient::SspClient(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, imf::Loop*, unsigned long, unsigned short, unsigned int)'
collect2: error: ld returned 1 exit status

Changing the macro definition to #define _GLIBCXX_USE_CXX11_ABI 0 results in a successful compile and an executable that can be started.

This is related to issue #1, only this time, the solution seems to be inverted.

mkucmpro commented 3 years ago

Same problem here. It seems that in https://github.com/imaginevision/libssp/commit/48f292114e059e7d408e0146cdb412a517a3368d the *.so file was compiled using either really old compiler or with _GLIBCXX_USE_CXX11_ABI=0.

Can you please provide a libssp.so built with _GLIBCXX_USE_CXX11_ABI=1