0

I have the Netbeans IDE installed on my Ubuntu machine. I have the libopenal-dev installed trough the console and I can confirm the header files are in place.

How do I configure Netbeans to build a program with OpenAL? Like do I need to set extra Linker Libraries (which I would expect) and where would those be located?

Imad Alazani
  • 6,688
  • 7
  • 36
  • 58
Jeroen
  • 15,257
  • 12
  • 59
  • 102
  • Why would you need extra flags? Doesn't the package install the headers and libs in the usual places? – trojanfoe Aug 06 '13 at 05:37
  • @trojanfoe Yeah but I do need to tell the Linker and or compiler those libraries should be used, no? Right now I've it setup with the default flags and however the header files can be found by both the IDE and the G++ compiler, it complains every OpenAL function call is an undefined reference. – Jeroen Aug 06 '13 at 05:45
  • 1
    I don't think OpenAL will be different to any other library though will it? If you can learn how to link 3rd party libraries using Netbeans it will works for anything installed into `/usr/lib`. – trojanfoe Aug 06 '13 at 05:46

1 Answers1

0

Its always informative to start off with a new library like openal by compiling manually at the command line. Here is a simple example :

g++ -o play_openal play_openal.cpp -lopenal

Notice the mention of -lopenal to pull in the openal library.
In your IDE add :

openal  

to list of Linker Libraries.

Scott Stensland
  • 26,870
  • 12
  • 93
  • 104