Cannot open include file al.h

sakshi2212

30-04-2009 02:38:24

I have built OgreAL through the steps as mentioned. But when I include OgreAl.h file in my project, it gives the error

"Cannot open include file al.h"

This file is present in the OpenAL include folder and OgreAL recognizes it while building. How do I ask my project to pick it up? This error comes from OgreALPrereqs.h

Phobius

01-05-2009 06:26:47

You must give the location of the OpenAL include files as part of your include paths during compilation. This is compiler specific so you're best off checking the manual on how to specify include paths.

golgobot

22-06-2009 05:31:15

I cannot find al.h anywhere on my system. I followed all the instructions and still receive these errors.

1>------ Build started: Project: OgreALVC9, Configuration: Debug Win32 ------
1>Compiling...
1>OgreALException.cpp
1>c:\ogreal\ogreal\include\ogrealprereqs.h(43) : fatal error C1083: Cannot open include file: 'al.h': No such file or directory
1>OgreALListener.cpp
1>c:\ogreal\ogreal\include\ogrealprereqs.h(43) : fatal error C1083: Cannot open include file: 'al.h': No such file or directory
1>OgreALOggSound.cpp
1>c:\ogreal\ogreal\include\ogrealprereqs.h(43) : fatal error C1083: Cannot open include file: 'al.h': No such file or directory
1>OgreALSound.cpp
1>c:\ogreal\ogreal\include\ogrealprereqs.h(43) : fatal error C1083: Cannot open include file: 'al.h': No such file or directory
1>OgreALSoundManager.cpp
1>c:\ogreal\ogreal\include\ogrealprereqs.h(43) : fatal error C1083: Cannot open include file: 'al.h': No such file or directory
1>OgreALWavSound.cpp
1>c:\ogreal\ogreal\include\ogrealprereqs.h(43) : fatal error C1083: Cannot open include file: 'al.h': No such file or directory
1>Generating Code...
1>Project : warning PRJ0018 : The following environment variables were not found:
1>$(BOOST_ROOT)
1>$(OGRE_SRC)
1>Build log was saved at "file://c:\OgreAL\OgreAL\OgreAL\Debug\BuildLog.htm"
1>OgreALVC9 - 6 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


Not sure why I need ORGE_SRC or BOOST_ROOT also. I just want to make this work. Any help?

I'm using Visual C++ 2008 Express Edition.

I downloaded and built ogg and vorbis successfully. I installed freealut. My environment vars are correct

OGRE_HOME : c:\OgreSDK

ALUT_BIN : C:\OgreAL\freealut-1.1.0-bin

OPENAL_SDK : C:\Program Files (x86)\OpenAL 1.1 SDK

Why can't the compiler find al.h?

I'm a Java guy, so pretty new to C++. A response like "You gotta link foo.dll" doesn't help. Specific solutions would be best. Thanks in advance!

Phobius

28-06-2009 22:50:23

If your OpenAL SDK is in C:\SDK\OpenAL, or whatever it is for you, then you'll most likely also have a C:\SDK\OpenAL\Include directory. Add that include directory as an Include path for your compiler.