Hello all.
I've been messing arround with openal trying to learn a bit of it.
Went to linuxpackages.net and download version 0.0.7 i486 for slack v10 (rating 3).
I'm following
this tutorial, well just copy, past and compile to see if every thing goes ok.
To compile I use
Code:
bash-3.1$ gcc teste.cpp -lopenal
but it gives this error
Code:
/tmp/ccg4tEWl.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
Here is the source (part of it)
Code:
#include <stdio.h>
#include <AL/al.h>
#include <AL/alut.h>
int main()
{ALuint Buffer;
ALuint Source;
// Position of the source sound.
ALfloat SourcePos[] = { 0.0, 0.0, 0.0 };
// Velocity of the source sound.
ALfloat SourceVel[] = { 0.0, 0.0, 0.0 };
// Position of the listener.
ALfloat ListenerPos[] = { 0.0, 0.0, 0.0 };
// Velocity of the listener.
ALfloat ListenerVel[] = { 0.0, 0.0, 0.0 };
// Orientation of the listener. (first 3 elements are "at", second 3 are "up")
ALfloat ListenerOri[] = { 0.0, 0.0, -1.0, 0.0, 1.0, 0.0 };
ALenum format;
ALsizei size;
ALvoid* data;
ALsizei freq;
ALboolean loop;
// Load wav data into a buffer.
alGenBuffers(1, &Buffer);
alutLoadWAVFile("FancyPants.wav", &format, &data, &size, &freq, &loop);
alBufferData(Buffer, format, data, size, freq);
alutUnloadWAV(format, data, size, freq);
The problem starts at
alGenBuffers(1, &Buffer)
I'm kinda stuck on this, can anyone help me out?
Thanks in advance.