Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Linking SFML statically - openal32.dll still required  (Read 5650 times)

0 Members and 1 Guest are viewing this topic.

Kvothe

  • Newbie
  • *
  • Posts: 11
    • View Profile
Linking SFML statically - openal32.dll still required
« on: May 10, 2015, 01:13:14 pm »
I compiled SFML using CMake for MinGW. After running "mingw32-make install" everything is built and installed with no errors. But when running the examples - pong.exe, sound.exe, sound-capture.exe and voip.exe all depend upon openal32.dll.

I specified SFML_USE_STATIC_LIBS = true when configuring CMake and all other dependencies of the example executables are only upon native windows dlls.

Can anyone explain why it has dynamically linked to openal32 (but nothing else)?

I came across this thread http://en.sfml-dev.org/forums/index.php?topic=262.0 which is discussing exactly the same problem. The last post on this thread indicates that openal32 was going to be statically linked in the future (and the thread is from 2008).

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: Linking SFML statically - openal32.dll still required
« Reply #1 on: May 10, 2015, 01:40:07 pm »
You must link OpenAL dynamically because of its license.

And SFML_USE_STATIC_LIBS does something different, by the way...
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Kvothe

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Linking SFML statically - openal32.dll still required
« Reply #2 on: May 10, 2015, 03:16:02 pm »
Just looked at it again - yes, I realise SFML_USE_STATIC_LIBS was not relevant to this at all, sorry...

Ah, reply #6 on this thread http://en.sfml-dev.org/forums/index.php?topic=262.0 led me to believe that the license for OpenAL did not have that restriction.

Is there anywhere that provides the license for OpenAL (their website http://openal.org/ has very little)? Or are you able to clarify - am I allowed to distribute the openal32.dll with my executable or does the end user have to download it themselves?

Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Re: Linking SFML statically - openal32.dll still required
« Reply #3 on: May 10, 2015, 03:24:19 pm »
As far as I understand it, OpenAL (in the version SFML uses) is licensed under the LGPL, so you should be able to distribute it as long as you adhere to the terms of the LGPL, but read the license yourself to be sure.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Linking SFML statically - openal32.dll still required
« Reply #4 on: May 10, 2015, 03:47:39 pm »
SFML uses OpenAL-Soft. OpenAL itself is just an open specification (like OpenGL).
Laurent Gomila - SFML developer

Kvothe

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Linking SFML statically - openal32.dll still required
« Reply #5 on: May 10, 2015, 04:30:34 pm »
Thank you very much for the responses  :)

For anyone else coming across this thread and wondering about the terms of the LGPL, this answer clears things up quite nicely http://stackoverflow.com/questions/30150217/sfml-not-linking-statically-to-openal32-links-statically-to-all-other-dependenc/30152505#30152505