   OpenAL- sample on gamedev wont compile
  Hey everyone,I am new to OpenAL and searched here for some articles on OpenAl and found one at http://www.gamedev.net/reference/articles/article2008.asp by Lee WinderBut when i was almost done reading i noticed "Download the sample code for this article here." on the page so i downloaded the sample but when i try'd to run it first time i got a few "No such file or directory" errors so then i commented out those includes but now i get another errors saying : "alutInit': identifier not found"Here is the code i am trying to compile[warning : i did nto change much cause i dont understand the problem] :// OpenAL includes#include <al.h>#include <alc.h>//#include <alctypes.h>//#include <altypes.h>//#include <alu.h>//#include <alut.h>#include <stdio.h>// Defines ////////////////////////////////////////////////////////////////////////#define NULL0#define NUM_BUFFERS2#define NUM_SOURCES1// Externs ////////////////////////////////////////////////////////////////////////// Globals ////////////////////////////////////////////////////////////////////////ALuint buffers[NUM_BUFFERS];ALuint source[NUM_SOURCES];// Declarations ///////////////////////////////////////////////////////////////////voidDisplayOpenALError(char* _string, ALenum error);// Displays the error that has occuredintLoadAndAssignWAV(char* _fileName, ALuint _buffer);// Fill a buffer with soundintInit(void);// Program initintUpdate(void);// Main updateintShutdown(void);// Program shutdownintmain(void);// Main entry// Functions ///////////////////////////////////////////////////////////////////////*---------------------------------------------------------------------------------Function: DisplayOpenALErrorPurpose: Prints out the error that we have encounteredInfo:Author: Lee Winder*/void DisplayOpenALError(char* _string, ALenum error){switch (error){case AL_INVALID_NAME:printf("%s Invalid Name", _string);break;case AL_INVALID_ENUM:printf("%s Invalid Enum", _string);break;case AL_INVALID_VALUE:printf("%s Invalid Value", _string);break;case AL_INVALID_OPERATION:printf("%s Invalid Operation", _string);break;case AL_OUT_OF_MEMORY:printf("%s Out Of Memory", _string);break;default:printf("*** ERROR *** Unknown error case in DisplayOpenALError\n");break;};}/*---------------------------------------------------------------------------------Function: LoadAndAssignWAVPurpose: Fills up a buffer with a new WAV soundInfo: Loads in the file, then fills up the bufferAuthor: Lee Winder*/int LoadAndAssignWAV(char* _fileName, ALuint _buffer){interror;ALenumformat; ALsizeisize;ALsizeifreq; ALbooleanloop;ALvoid*data;// Load in the WAV file from diskalutLoadWAVFile(_fileName, &format, &data, &size, &freq, &loop); if ((error = alGetError()) != AL_NO_ERROR) { DisplayOpenALError("alutLoadWAVFile : ", error);return 0; }// Copy the new WAV data into the bufferalBufferData(_buffer,format,data,size,freq); if ((error = alGetError()) != AL_NO_ERROR) { DisplayOpenALError("alBufferData :", error); return 0; }// Unload the WAV filealutUnloadWAV(format,data,size,freq); if ((error = alGetError()) != AL_NO_ERROR) { DisplayOpenALError("alutUnloadWAV :", error);return 0;}return 1;}/*---------------------------------------------------------------------------------Function: InitPurpose: Initilises the programInfo:Author: Lee Winder*/int Init(void){interror;ALfloatlistenerPos[]={0.0,0.0,0.0};// At the originALfloatlistenerVel[]={0.0,0.0,0.0};// The velocity (no doppler here)ALfloatlistenerOri[]={0.0,0.0,-1.0, 0.0,1.0,0.0};// LookAt then Up// Init openALalutInit(0, NULL);// Clear Error CodealGetError(); // Create the buffersalGenBuffers(NUM_BUFFERS, buffers);if ((error = alGetError()) != AL_NO_ERROR) { DisplayOpenALError("alutUnloadWAV :", error);return 0;}// Load in the WAV and store it in a bufferif (!LoadAndAssignWAV("test.wav", buffers[0])){// Error loading in the WAV so quitalDeleteBuffers(NUM_BUFFERS, buffers); return 0;}// Load in the WAV and store it in a bufferif (!LoadAndAssignWAV("test2.wav", buffers[1])){// Error loading in the WAV so quitalDeleteBuffers(NUM_BUFFERS, buffers); return 0;}// Generate Sources alGenSources(NUM_SOURCES, source); if ((error = alGetError()) != AL_NO_ERROR) { DisplayOpenALError("alutUnloadWAV :", error); return 0; }// Attach buffer 0 to our sourcealSourcei(source[0], AL_BUFFER, buffers[0]); if ((error = alGetError()) != AL_NO_ERROR) { DisplayOpenALError("alSourcei :", error); return 0; }// Set Listener attributes// Position ... alListenerfv(AL_POSITION,listenerPos); if ((error = alGetError()) != AL_NO_ERROR) { DisplayOpenALError("alListenerfv :", error); return 0;}// Velocity ... alListenerfv(AL_VELOCITY,listenerVel); if ((error = alGetError()) != AL_NO_ERROR) { DisplayOpenALError("alListenerfv :", error); return 0;}// Orientation ... alListenerfv(AL_ORIENTATION,listenerOri); if ((error = alGetError()) != AL_NO_ERROR) { DisplayOpenALError("alListenerfv :", error); return 0;}// Alll done...return 1;}/*---------------------------------------------------------------------------------Function: UpdatePurpose: Main update loopInfo:Author: Lee Winder*/int Update(void){intsourceState;ALfloat sourcePos[] = {0.0f, 0.0f, 0.0f};// Set the position of our sourcealSourcefv(source[0], AL_POSITION, sourcePos);// Play italSourcePlay(source[0]);printf("Source played dead centre\n");// Wait till it has finishedalGetSourcei(source[0], AL_SOURCE_STATE, &sourceState);while(sourceState == AL_PLAYING)alGetSourcei(source[0], AL_SOURCE_STATE, &sourceState);// Set position of our sourcesourcePos[0] = 5.0f;alSourcefv(source[0], AL_POSITION, sourcePos);// Play italSourcePlay(source[0]);printf("Source played to the right\n");// Wait till it has finishedalGetSourcei(source[0], AL_SOURCE_STATE, &sourceState);while(sourceState == AL_PLAYING)alGetSourcei(source[0], AL_SOURCE_STATE, &sourceState);// Set position of our sourcesourcePos[0] = -5.0f;alSourcefv(source[0], AL_POSITION, sourcePos);// Play italSourcePlay(source[0]);printf("Source played to the left\n");// Wait till it has finishedalGetSourcei(source[0], AL_SOURCE_STATE, &sourceState);while(sourceState == AL_PLAYING)alGetSourcei(source[0], AL_SOURCE_STATE, &sourceState);// Set position of our sourcesourcePos[0] = -10.0f;alSourcefv(source[0], AL_POSITION, sourcePos);// Play italSourcePlay(source[0]);printf("Tracking source\n");// Wait till it has finished (As im not taking into account frame time, this will be different on your PC!)alGetSourcei(source[0], AL_SOURCE_STATE, &sourceState);while(sourceState == AL_PLAYING){// Move the positionsourcePos[0] += 0.0005f;alSourcefv(source[0], AL_POSITION, sourcePos);// Check the statealGetSourcei(source[0], AL_SOURCE_STATE, &sourceState);}// Assign a new bufferalSourcei(source[0], AL_BUFFER, buffers[1]); // Play italSourcePlay(source[0]);printf("Stereo sample.  Non-Positional\n");// Wait till it has finished (As im not taking into account frame time, this will be different on your PC!)alGetSourcei(source[0], AL_SOURCE_STATE, &sourceState);while(sourceState == AL_PLAYING)alGetSourcei(source[0], AL_SOURCE_STATE, &sourceState);// Finishedreturn 1;}/*---------------------------------------------------------------------------------Function: ShutdownPurpose: Shutdowns the programInfo:Author: Lee Winder*/int Shutdown(void){// Delete the sources and the buffersalDeleteSources(NUM_SOURCES, source);alDeleteBuffers(NUM_BUFFERS, buffers); // Exit OpenALalutExit();return 1;}/*---------------------------------------------------------------------------------Function: mainPurpose: Main entry point for the programInfo:Author: Lee Winder*/int main(void){Init();Update();Shutdown();return 0;}also if anyone know where i can get some up to date OpenAl sample codes or tutorials please show me where. Thanks in Advance.   
  AFAIK, the current version of OpenAL doesn't come with ALUT. Unfortunately, many of the tutorials you'll find online are built around ALUT, and therefore won't work without some modification.I don't know of any more up-to-date tutorials, but I know there are some threads in the archives that address the problem. (For example, a search for 'openal without alut' turns up this thread.)   