Jump to content
  • Advertisement
Sign in to follow this  
inquisitor34

How to determine whether OpenAL is installed?

This topic is 746 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
You cannot detect if third-party libraries are installed from inside C++.

You'll need to use an installer script or a build tool like Premake/CMake/etc. and detect third-party libraries prior to compilation.

Share this post


Link to post
Share on other sites

@Infinisearch

 

No, I am doing conditional compilation using preprocessor directives and wondered whether I can detect, at compile time, if OpenAL is installed.

Share this post


Link to post
Share on other sites
You could write a short program or preprocessor module that seeks for OpenAL by using LoadLibrary or the linux one operation to get a pointer to it. If you get a pointer that is not null then you have OpenAL found and return some kind of int code to indicate that, then either using buildfiles or the prebuild events in MS Visual Studio to e.g. replace a config file with the specific one setting the PP macro correctly

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!