You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, love this library. I just want to document a problem I had when packaging it for an embedded system with (very) limited storage space. Using the $CC to link lzmq.so is that it only works if libstdc++ is a shared library. If it's a static library, then -lstdc++ gets ignored by GCC and the throw and new symbols are not linked at all. For some dubious reasons, it actually still produce a binary, but it doesn't work (undefined symbols at runtime).
Maybe wrapped in an CMAKE_CXX_COMPILER_ID check if you want to preserve the ability to compile on system without a C++ compiler, but which a shared libstdc++ library.
Or stop using C++ exception (and that's better). Then it's really only C symbols and wont depend on libstdc++ at all. C++ exceptions are banned in a lot of projects for various reasons, this is one of them.
The text was updated successfully, but these errors were encountered:
Hello, love this library. I just want to document a problem I had when packaging it for an embedded system with (very) limited storage space. Using the
$CC
to linklzmq.so
is that it only works iflibstdc++
is a shared library. If it's a static library, then-lstdc++
gets ignored by GCC and thethrow
andnew
symbols are not linked at all. For some dubious reasons, it actually still produce a binary, but it doesn't work (undefined symbols at runtime).Please either add this to
CMakeLists.txt
:Maybe wrapped in an
CMAKE_CXX_COMPILER_ID
check if you want to preserve the ability to compile on system without a C++ compiler, but which a sharedlibstdc++
library.Or stop using C++ exception (and that's better). Then it's really only C symbols and wont depend on
libstdc++
at all. C++ exceptions are banned in a lot of projects for various reasons, this is one of them.The text was updated successfully, but these errors were encountered: