I am trying to find a way to get OpenAL to work on my computer:
Ubuntu 12.10 (running on 2010 intel i7 Macbook Pro)
I installed the OpenAL library from the terminal:
$ sudo apt-get install libopenal-dev
Everything went well. Now I tried to create a simple C ++ program where I include the library:
#include <iostream> #include <AL/alut.h> using namespace std; int main(){ cout << "Hello, world" << endl; }
No matter how hard I tried, the closest I came to to find how to compile it with g ++ was the following:
$ g++ test.cpp -lalut
This results in the following error:
test.cpp:2:21: fatal error: AL/alut.h: No such file or directory compilation terminated.
Any ideas on how to connect OpenAL to my projects? I spent hours on Google and the answer does not seem to exist. I probably did something fundamentally wrong, as I am new to Linux C ++ development. Thanks.
Edit: modified for reference:
$ g++ -lalut test.cpp
to
$ g++ test.cpp -lalut
(later this is the correct way to do this, I wrote it incorrectly).
source share