1

I'm running on Lubuntu using Code::Blocks with GCC, and despite installing the OpenAL dev packages with the commands:

sudo apt-get install libopenal-dev
sudo apt-get install libalut-dev

It reports the error "no such file or directory" when trying to include the headers. The #includes I've attempted (in-case it's a naming issue) are:

#include <OpenAl/al.h>
#include <OpenAl/alc.h>

-

#include <AL/al.h>
#include <AL/alc.h>

-

#include <al.h>
#include <alc.h>

Which all produce the same file/directory not found error.

What do I need to do in order to get GCC to 'see' the OpenAL headers?

It's not a duplicate of:

How to compile OpenAL program with g++ (Ubuntu)?

Because if you read the answer for that question is to "Make sure you have alut installed". If anyone took 3 seconds to read the top of this question they will see that it is already installed. Furthermore that question doesn't deal with CodeBlocks.

c1646091
  • 306
  • 1
  • 10
  • 2
    what's the output of `locate /al.h` ? – Patrick Trentin Jun 18 '16 at 19:53
  • Also, possible duplicate of http://stackoverflow.com/questions/32230601/g-unable-to-link-openal-libraries – Patrick Trentin Jun 18 '16 at 19:58
  • @PatrickTrentin It's /usr/include/AL/al.h. – c1646091 Jun 19 '16 at 01:38
  • I was able to compile on Ubuntu using `#include ` and the answer to the second link I posted. Did it work for you? Did you try using the full path? – Patrick Trentin Jun 19 '16 at 07:58
  • 1
    Cannot reproduce: Code::Blocks 16.01, GCC 5.3/6.1. ``,`` both found. Please provide a [Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve) – Mike Kinghan Jun 19 '16 at 11:36
  • Digging further, it appears the file ALCheck.hpp (found in SFML's source code under the Audio folder) assumes it's located at #include , when judging by Mike's comment it's located at . I'm not entirely sure why my project doesn't detect . (a new, fresh one works, but that doesn't help my developed project much). The workaround I discovered was to point codeblocks compiler search directories at /usr/include/AL. It strikes me however that SFML should have it defined as for linux, not – c1646091 Jun 19 '16 at 12:22

0 Answers0