Open maximumspatium opened 4 years ago
Okay, I was able to statically link to libsoundio by adding the following command to my CMakeLists.txt:
get_directory_property(LIBSOUNDIO_LIBS DIRECTORY thirdparty/libsoundio DEFINITION LIBSOUNDIO_LIBS)
This solution is inspired by the cmake file of DeEsser project. Kudos to @Crataegus27
The updated CMakeLists.txt is located here
Unfortunately, linking to libsoundio_static
VisualStudio 2019 doesn't work. I'm getting a bunch of errors like:
undefined symbol: __imp_soundio_outstream_create
undefined symbol: __imp_soundio_outstream_open
...
The above errors come from the LLVM/Clang toolchain. Switching to the MSVC toolchain produces similar errors (LNK2019 & LNK1120).
Linking to libsoundio_shared works though.
Help please!
You need to define SOUNDIO_STATIC_LIBRARY for static linking. Use -DSOUNDIO_STATIC_LIBRARY
Hello,
first of all, thank you for bringing us this amazing sound library!
I'm planning to use libsoundio as sound server in our experimental Power Macintosh emulator DingusPPC (https://github.com/dingusdev/dingusppc).
While the initial integration has now been completed, I'd like to further optimize the build by using the static version of the library. Unfortunately, it doesn't work for me.
Instead of using a separate libsoundio installation, I compile and link libsoundio along with my application.
Our source tree is organized as follows:
That's the corresponding excerpt from our CMakeLists.txt:
The above build configuration only works with "libsoundio_shared". When I change it to "libsoundio_static" the build fails with the following error message:
What can I do to make it work?
I'm using: Mac OS X 10.13.6 clang 7.1.0 cmake 3.16.5