openal linking problem on vc++ express 2005

abousoft
Unregistered
 
Post: #1
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
Quote this message in a reply
Moderator
Posts: 702
Joined: 2002.04
Post: #2
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)

Mark Bishop
--
Student and freelance OS X & iOS developer
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  OpenAL looping sound problem Gillissie 0 3,886 Sep 16, 2010 12:31 AM
Last Post: Gillissie
  problem with linking with libjpeg Gecko 2 3,688 Oct 26, 2008 05:40 AM
Last Post: Gecko
  Problem linking GLSL Ilyasim 4 3,812 Dec 18, 2007 12:46 PM
Last Post: OneSadCookie
  Problem Streaming OGG using OpenAL in C++ TooMad 6 4,919 Jun 16, 2006 07:59 AM
Last Post: TooMad
  PCI Express graphics anytime soon? kelvin 7 4,970 Nov 23, 2004 04:42 AM
Last Post: DoG