iDevGames Forums
openal linking problem on vc++ express 2005 - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Graphics & Audio Programming (/forum-9.html)
+--- Thread: openal linking problem on vc++ express 2005 (/thread-3592.html)



openal linking problem on vc++ express 2005 - abousoft - Jan 1, 2007 01:43 AM

Hey ,

I'm new to openal and I'm trying to use it however I'm facing an error in code of the hello world example
1) I downloaded the openAl sdk and from http://www.openal.org and 2) installed it
3) I have added the path of the lib directory (containing alut.lib)
to the library files in vc++
4) I have added the path of the include directory(containing alut.h ,al.h and alc.h) to the include files in vc++

When trying to compile this code:
#include "stdafx.h"
#include <stdlib.h>
#include <al.h>
#include <alut.h>


int main(int argc, char** argv)
{
ALuint helloBuffer;
ALuint helloSource;
alutInit (&argc, argv);
helloBuffer = alutCreateBufferHelloWorld();
alGenSources (1, &helloSource);
alSourcei (helloSource, AL_BUFFER, helloBuffer);
alSourcePlay (helloSource);


alutSleep (1);
alutExit ();
return EXIT_SUCCESS;
}
The following errors occured:

Compiling...
openal.cpp
Linking...
openal.obj : error LNK2019: unresolved external symbol __imp__alutExit referenced in function _main
openal.obj : error LNK2019: unresolved external symbol __imp__alutSleep referenced in function _main
openal.obj : error LNK2019: unresolved external symbol __imp__alSourcePlay referenced in function _main
openal.obj : error LNK2019: unresolved external symbol __imp__alSourcei referenced in function _main
openal.obj : error LNK2019: unresolved external symbol __imp__alGenSources referenced in function _main
openal.obj : error LNK2019: unresolved external symbol __imp__alutCreateBufferHelloWorld referenced in function _main
openal.obj : error LNK2019: unresolved external symbol __imp__alutInit referenced in function _main
C:\Documents and Settings\Abousafy\My Documents\Visual Studio 2005\Projects\openal\Debug\openal.exe : fatal error LNK1120: 7 unresolved externals

so any ideas , I really need to use it in a graphics project

Thanks


openal linking problem on vc++ express 2005 - sealfin - Jan 1, 2007 03:55 AM

Whilst there are plenty of cross-platform coders here who might be able to answer your question, this is a Mac coding forum, and so it would be far better to ask your question on a Windows coding forum (try GameDev.net's forums)