BC++: OpenAL unresolved externals.. odd *SOLVED*

Started by
4 comments, last by Myth000 18 years, 8 months ago
Ok.. so either if I use the latest beta of OpenAL or the latest stable build I get these unresolved externals as linking errors:

alutLoadWAVFile
alutUnLoadWAVFile
alutExit
I use Borland C++ Builder 6. I've used the coff2omf tool for all libaries that were in the SDK and link against them:

#pragma comment(lib, "BOR_OpenAL32.lib")
#pragma comment(lib, "BOR_ALut.lib")
It does link, because when I leave it out more errors appear. If it matters, here is the code I use to load the wav file. It's quite straight from the openAL demo. That demo won't compile for me too.

    // Variables to load into.
    ALenum format;
    ALsizei size;
    ALvoid* data;
    ALsizei freq;
    ALboolean loop;

    // Load wav data into buffers.
    alGenBuffers(NUM_BUFFERS, Buffers);

    if (alGetError() != AL_NO_ERROR)
        return AL_FALSE;

    alutLoadWAVFile("my relative path is here", &format, &data, &size, &freq, &loop);
    alBufferData(Buffers[BATTLE], format, data, size, freq);
    alutUnloadWAV(format, data, size, freq);



Did anyone else have the same error, and fixed it? If so how? Thank you for your help. [Edited by - Myth000 on August 18, 2005 9:14:09 AM]
Advertisement
BUMP! Crap is this the wrong forum to post it or something?
I've been exactly where you are, so here's the good and bad news.

Okay, time for the bad news. Borland C++ Builder 6 cannot use ALUT. It's a COFF static library (which means coff2omf won't work), and unless you get the OpenAL source code for it, you're pretty much screwed.

The good news is you can actually get the source code off of CVS for OpenAL. At least, you used to be able to...not sure about it anymore. If you can't, you'll just have to do it by hand. It's not as difficult as it sounds though. There's actually a tutorial here at GameDev.net to help you load WAV files. Not very accurate though...best to get an "official" file format document for it and do your best. I did it, and I'm not a very good programmer. ;) I'd give you source code, but I lost it a few days ago thanks to Best Buy.

Sorry, and good luck.
yes you can get the source from cvs, though you would have to make borland project files or import them somehow:

http://www.openal.org/downloads.html
Quote:
Note: There are prepared SDKs available from Creative and NVIDIA (linked below) which come in very handy for Windows and Macintosh programmers. If you are running Linux, you may already have OpenAL on your system -- if not, then you'll want to download from CVS or a package repository (one is linked below). For all operating systems, there is a Programmer's Guide available on the Creative developer website which is recommended reading.

OpenAL Source Code:
The OpenAL source code is available from the following location. Here are the CVS access parameters:

From the command line, you can do the following:

cvs -d:pserver:guest@opensource.creative.com:/usr/local/cvs-repository login
(use password "guest")
cvs -d:pserver:guest@opensource.creative.com:/usr/local/cvs-repository co openal

If you are using a GUI front end for CVS, use the following parameters:

authentication = pserver
account = guest
password = guest
server = opensource.creative.com
path = /usr/local/cvs-repository

Use the client's "login" function with password "guest" and then check out module "openal".

CVS Tags
Here are the relevant current CVS tags:

* HEAD contains the latest 1.1 code for all implementations (not guaranteed buildable or complete)
* Linux_Spec1-0 for the last Linux code before the transition towards OpenAL 1.1 began
* MacOSX1-2_Spec1-0 for the last MacOS X code before the transition towards OpenAL 1.1 began
* Win1-1-2_Spec1-0 for the last Windows code before the transition towards OpenAL 1.1 began

To use one of these tags, modify the checkout command as follows:
cvs -d:pserver:guest@opensource.creative.com:/usr/local/cvs-repository co -r TAG openal
Anything posted is personal opinion which does not in anyway reflect or represent my employer. Any code and opinion is expressed “as is” and used at your own risk – it does not constitute a legal relationship of any kind.
Ok thans guys. I'm trying to recompile the complete openal source.
It's alot :)
Anyway, compiling went quite alright after some changes.
Now I'm busy getting some linking libs.
Ok, that was doing too much work for nothing. And wav's load fast anyway.
So, I checked that article on loading wav files to work for OpenAL and create an wrapper for OpenAL. Works :D

[Edited by - Myth000 on August 18, 2005 4:05:01 PM]

This topic is closed to new replies.

Advertisement