OpenAL in C++ Builder

Started by
2 comments, last by LilBudyWizer 18 years, 5 months ago
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
Advertisement
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.
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
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.
Keys to success: Ability, ambition and opportunity.

This topic is closed to new replies.

Advertisement