Sign in to follow this  
renatoelt

OpenAL in C++ Builder

Recommended Posts

renatoelt    122
I'm trying to use OpenAL in Borland C++ Builder. How to configure the OpenAL to use in this compiler?? Any secret or tips? Renato Abreu Eng. Elétrica - UFV

Share this post


Link to post
Share on other sites
Maega    707
Are you building from source? If not, you'll need to make sure you are using the Borland library. Libraries for other compilers won't work.

Borland uses the OMF format for its libraries where as compilers like Visual C++ use the COFF format. They are not compatible.

Share this post


Link to post
Share on other sites
renatoelt    122
No. This is not the prblem. I'm having some linking errors.
I dont know how to imput the openal libs in the project.
Do you know any text about Setting up OpenAL in C++ Builder??

Thanks very much

Share this post


Link to post
Share on other sites
LilBudyWizer    491
Which errors is some errors in linking? If you just use the libs that came with it you get an error about the format. Something along the lines of invalid OMF file, perhaps COFF. You have to run the libs through COFF2OMF, but that doesn't work with the ALut library. You don't get any error messages from the utility, but when you link you get unresolved external referances for alut functions.

So to use ALut you have to download the source and to do that you need CVS. A post by me asking for help on here has a link to a CVS front end. Download that and install it then cut and paste the command lines listed on the OpenAL site and it'll download everything for you.

Then go into C++ Builder and start a new project to build a DLL. Add all the files in the openal\alut\src directory that was downloaded, add the openal\alut\include and openal\include directories to you include path and add a conditional of HAVE_CONFIG_H=1 and ALUT_BUILD_LIBRARY to the conditionals. You'll need to create a config.h file in the project directory with the following lines:


#define HAVE_STDINT_H 1
#define HAVE_STAT 1
#define HAVE_SLEEP 1
#define HAVE_WINDOWS_H 1



Finally you need to include <AL\ALut.h> in the dll source, i.e. the one with DllEntryPoint in it. That should get you a compile. Include the lib file from that in your project and put the DLL in an appropriate directory, i.e. your project directory, the windows system directory or somewhere in the search path for executables.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this