Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix MSVC static library + regular builds via CMake #224

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kuroneko
Copy link

  • due to cmake quirks, you can't specify a white-space only library name. CMake genuinely tries to link a " .lib" resulting in build failures.

  • With how the headers are written, if you want to static-link soundio, SOUNDIO_STATIC_LIBRARY must be defined during compile - this suppresses the DLL export/import declarations - if this is not done, you get errors about missing imp... symbols during link due to the symbol munging that MSVC uses for DLL import libraries. Export the symbol through the CMAKE mechanisms by declaring it PUBLIC.

* due to cmake quirks, you can't specify a white-space only library
  name.  CMake genuinely tries to link a " .lib" resulting in build
  failures.

* With how the headers are written, if you want to static-link soundio,
  SOUNDIO_STATIC_LIBRARY must be defined during compile - this supresses
  the DLL export/import declarations - if this is not done, you get
  errors about missing _imp_... symbols during link due to the symbol
  munging that MSVC uses for DLL import libraries.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant