SFML community forums

Help => General => Topic started by: Cryonic on August 06, 2015, 03:30:59 am

Title: Combine exe with openal32.dll [SOLVED]
Post by: Cryonic on August 06, 2015, 03:30:59 am
I have my libraries statically linked with my exe, but in order to make it work with the audio module I still need to include the "openal32.dll" in the same directory as my exe. But, that further stalls me in my ultimate goal of running my program with absolutely nothing but my exe.

Is there not a way to combine this "openal32.dll" with my exe either the way I did my libraries statically or is there any other way to merge them?
Title: Re: Combine exe with openal32.dll
Post by: zsbzsb on August 06, 2015, 03:34:44 am
Is there not a way? Sure there is a way, you need to recompile OpenAL-soft library so that is can be statically linked. And then while you are at it make sure to publish the source code for your program under the LGPL license also.
Title: Re: Combine exe with openal32.dll
Post by: Cryonic on August 06, 2015, 03:46:23 am
Okay, so I can look into the license stuff. But, do you have any advice on how to create a static version of the dll?
Title: Re: Combine exe with openal32.dll
Post by: ChronicRat on August 06, 2015, 08:38:43 am
It's simple with OpenAL. I don't remember exactly, (m.b. it even has flags to it) you just need to redfine function's declaration EXPORT (or something like this) macro.
Title: Re: Combine exe with openal32.dll
Post by: Hapax on August 06, 2015, 12:22:49 pm
Okay, so I can look into the license stuff.
This should help (http://www.gnu.org/copyleft/lesser.html)  ;)

Note that it seems to suggest (4d (http://www.gnu.org/copyleft/lesser.html#section4)) that, unless you link to a shared library, you must provide your source code.
Title: Re: Combine exe with openal32.dll
Post by: eXpl0it3r on August 06, 2015, 12:27:51 pm
Note that it seems to suggest (4d (http://www.gnu.org/copyleft/lesser.html#section4)) that, unless you link to a shared library, you must provide your source code.
If you're already rephrasing the license, you might as well point out that you can also just provide the object files. ;)

As for the topic: This is not supported by SFML and if you do link OpenAL-soft statically, you can't use the official SFML version, instead you have to create a fork and change the license. Additionally you have to make sure that the licenses of all the dependencies etc. allow this kind of usage.

In short: It's not worth it! And shipping a DLL next to your EXE is not something "bad".
Title: Re: Combine exe with openal32.dll
Post by: Hapax on August 06, 2015, 01:00:39 pm
If you're already rephrasing the license, you might as well point out that you can also just provide the object files.
I wasn't rephrasing; I was saying what it seemed like to me. I didn't say that I understood the licence but that's enough reason for me to not use it (not understanding it).

In short: It's not worth it! And shipping a DLL next to your EXE is not something "bad".
Totally agree.