alut and various openal issues

E7d676561a0f1a6951b374ec9cd46e46
0
stranomavero 101 Sep 17, 2007 at 14:13

I’m studying the tutorial http://www.devmaster.net/articles/openal/ but the code downloadable from that page is not working for me.

I’ve been having trobles with openAL such as lots of errors in locating file and libraries and i’ve been fighting with alut for ages…but finally i fixed those errors!

Now everything seems working,except for a long list of [Linker error] undefined reference to :

[Linker error] undefined reference to `_imp__alutUnloadWAV’
[Linker error] undefined reference to `_imp__alSourcef’
[Linker error] undefined reference to `_imp__alSourcef’
[Linker error] undefined reference to `_imp__alSourcei’
[Linker error] undefined reference to `_imp__alSource3f’
[Linker error] undefined reference to `_imp__alSource3f’
[Linker error] undefined reference to `_imp__alSourcei’
[Linker error] undefined reference to `_imp__alSourcePlay’
[Linker error] undefined reference to `_imp__alSourceStop’
[Linker error] undefined reference to `_imp__alDeleteSources’
[Linker error] undefined reference to `_imp__alDeleteBuffers’
[Linker error] undefined reference to `WinMain@16’
ld returned 1 exit status
C:\Documents and Settings\Francesco\Desktop\C++\OpenAL\openaltut\Makefile.win [Build Error] [1.exe] Error 1

can anyone help me understanding what’s wrong now?

Thank u very much

6 Replies

Please log in or register to post a reply.

B91eae75cd6245bd8074bd0c3f1cc495
0
Nils_Pipenbrinck 101 Sep 17, 2007 at 14:55

@stranomavero

can anyone help me understanding what’s wrong now?

Yep. You forgot to link a library. I guess it’s name will be alut.lib or something like this. You have to add that thing to the linker settings. How you do this depends on the compiler/linker you use.

Nils

E7d676561a0f1a6951b374ec9cd46e46
0
stranomavero 101 Sep 17, 2007 at 15:00

Sorry,i forgot to mention it:i’m using Dev-cpp.

thanks for the advise,now i’ve fixed all those errors but i have:

[Linker error] undefined reference to `IID_IDirectInput8A’
[Linker error] undefined reference to `DirectInput8Create@20’
[Linker error] undefined reference to `GUID_SysKeyboard’
[Linker error] undefined reference to `c_dfDIKeyboard’
[Linker error] undefined reference to `WinMain@16’

are they referring to a directx library?
which one? i can’t find it.

thanks again

6f0a333c785da81d479a0f58c2ccb203
0
monjardin 102 Sep 17, 2007 at 17:32

I think you’re missing dinput8.lib (or whatever the version number should be), and you need to declare a WinMain function.

E7d676561a0f1a6951b374ec9cd46e46
0
stranomavero 101 Sep 18, 2007 at 10:45

thanks!
it looks like a neverending story…i fixed that problem (thanks to u!)…then i had trouble with glaux.h…fixed that…and now i have new errors:

C:\Documents and Settings\Francesco\Desktop\C++\openaltut\main.cpp In function `int LoadGLTextures()’:
179 C:\Documents and Settings\Francesco\Desktop\C++\openaltut\main.cpp name lookup of `loop1’ changed for new ISO `for’ scoping
172 C:\Documents and Settings\Francesco\Desktop\C++\openaltut\main.cpp using obsolete binding at `loop1’
C:\Documents and Settings\Francesco\Desktop\C++\OpenAL\openaltut\Makefile.win [Build Error] [../../openaltut/main.o] Error 1

46407cc1bdfbd2db4f6e8876d74f990a
0
Kenneth_Gorking 101 Sep 18, 2007 at 13:44

The latest ISO standards changed the way the scoping rules for ‘for’ behaves. You probably have some code like this:

for(int loop1=0; loop1<something; loop1++)
{
     ...
}
int bla = loop1; // <-- This is no longer legal, because loop1's scope has ended

If you change it to this:

int loop1;
for(loop1=0; loop1<something; loop1++)
{
     ...
}
int bla = loop1; // <-- This is now legal, because loop1 is still in the scope

…it should work fine.
I haven’t seen your code, so I may be way off though :)

E7d676561a0f1a6951b374ec9cd46e46
0
stranomavero 101 Sep 18, 2007 at 13:55

have u got any superpowers??? :)
i did what u said and that error now is gone…
but i’m having new link errors! this thing is driving me crazy!!!!