c++windowsdllopenal

How do I deliver OpenAL32.dll with my application without requiring OpenAL installation on the client machine?


I have a 32-bit C++ Windows application using the OpenAL library. I am using the official OpenAL setup to install the required DLL file, but when I publish my application, I would like to find a way to deliver it without requiring the user to install OpenAL seperately like I did.

With other DLL files, I simply add them to my project, but with OpenAL I seemed to get issues. Is this possible? And if so, how?


Solution

  • Apparently, I mixed up the System32 and SysWow64 folders in Windows.

    It should be the other way around!

    For reference: https://www.howtogeek.com/326509/whats-the-difference-between-the-system32-and-syswow64-folders-in-windows/

    What I did:

    So I installed OpenAL from the official installation source. This installer copies the OpenAL32.dll files into the System32 and SysWow64 folders.

    As my application is 32-bit I needed to copy OpenAL32.dll from SysWow64 folder into my executable directory. Once I uninstalled OpenAL (which removed these .dll files from my Windows System32 and SysWow64 folders, it worked with the .dll file accompanied with my executable file.