PDA

View Full Version : Problem compiling OpenAL in Borland Builder 6


pa1
01-14-2006, 10:00 PM
Hello.
I can't compile a single program in BC++ that uses alut.lib (alutinit, alutWAV...) because the compiler shows:
[Linker Error] Unresolved external '_alutLoadWAVFile' referenced from C:\ OAL\UNIT1.OBJ
I know that I included the OpenAL32.lib and alut.lib in the project, and that I changed the original libraries from the SDK made for Visual C++ with the COFF2OMF, but this doesn`t work. The strange thing is that the converted OpenAL32.lib (OMF format) is acepted by the BC compiler, but not the converted Alut.lib.
So, Can anybody help me how can I make the BC compiler accepts the Alut.lib?
(with an example, if possible):yes:
Thank you.

Reedbeta
01-14-2006, 10:28 PM
It could be a name mangling issue. Make sure that the header files are being included as extern "C", either in your .cpp file or in the header file itself.

Mr Ed
01-28-2006, 04:44 AM
Hi,
I've just run into the same problem... Here's what to do

implib -a openal32_bor.lib openal32.dll
that sorts out the lib for the dll

for the static library - go to the openal.org website and download the source for alut and build the library yourself.
(In builder create a new project for a static library and add the .c files to it.
Set up the path in the project to openal include. You'll run into some #define issues - but they are easy to resolve).
Hope this helps

pa1
07-06-2006, 01:04 PM
Maybe Itīs been some time since these post, but thanks for your help.
I also found an easier solution: Instead of using the alut.lib that comes with the OpenAL SDK, use the one that is in openal.org, but in the link that's for downlaoding the last version of ALUT. Then, I convert that alut.lib with the COFF2OMF and that converted file works.
That's all.
Bye.