Description
I need to compile on Linux to link with a project that uses clang and libc++ (rather than gcc and libstdc++)
It took me a few hours of googling and trial and error to figure out the solution.
Either it could be documented or made simpler via cmake config
When does the problem happen
Environment
Ubuntu 18, with cmake 3.30
Steps To Reproduce
To successfully compile sentry-native, the following needs to be done:
- Install prerequisites
- zlib-dev
- libssl-dev
- clang
- libc++-dev
- libc++abli-dev
- run cmake with the following extra options:
-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_FLAGS="-stdlib=libc++" -DCMAKE_EXE_LINKER_FLAGS="-stdlib=libc++"
Description
I need to compile on Linux to link with a project that uses clang and libc++ (rather than gcc and libstdc++)
It took me a few hours of googling and trial and error to figure out the solution.
Either it could be documented or made simpler via cmake config
When does the problem happen
Environment
Ubuntu 18, with cmake 3.30
Steps To Reproduce
To successfully compile sentry-native, the following needs to be done:
-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_FLAGS="-stdlib=libc++" -DCMAKE_EXE_LINKER_FLAGS="-stdlib=libc++"