Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Compiling OALwrapper in VS2008
Vasator Offline
Junior Member

Posts: 10
Threads: 1
Joined: Nov 2010
Reputation: 0
#1
Compiling OALwrapper in VS2008

Hello, I have been trying to compile OALWrapper for about two weeks now without much success.
I've been going through the forums and trying out different fixes and trying to find a solution without success.




Compiling Overture
WindowsXP
Visual Studio 2008

Steps I took:

Created Directory structure:
c:\OvertureSource ..
Dependancies - unzipped from website
HPL1Engine - utilizing Github, copied files to this directory
OALWrapper - utilizing Github, copied files to this directory
Penumbra - utilizing Github, copied files to this directory
Redist - copied game files to this directory

Opened the sln file and VS08 did not prompt me to convert
changed to build from debug to release
went into project properties:
created the lib directory and set it to be the output directory
configuration type is already set to "lib"
set the additional include directories to:
C:\OvertureSource\dependancies\include
C:\OvertureSource\oalwrapper\include
in Preprocessor definitions set "WIN32, WITH_ALUT" (without the quotes obviously)
under librarian/general
set the following:
Additional Dependancies = alut.lib
Additional Library Directories = c:\OvertureSource\dependancies\lib\win32
Link Library Dependancies = Yes

Test Build 1 saved under c:\OvertureSource\OALWrapper\Buildlog\Buildlog1.html
errors:
.\sources\OAL_OggStream.cpp(154) : error C2065: 'OV_CALLBACKS_DEFAULT' : undeclared identifier
.\sources\OAL_OggSample.cpp(61) : error C2065: 'OV_CALLBACKS_DEFAULT' : undeclared identifier

Found issue and possible solutions:
http://www.frictionalgames.com/forum/thread-16842.html

downloading libvorbis and libogg
c:\libvorbis
c:\libogg
copying the ogg and libvorbis directories from C:\libvorbis-1.1.0\include to C:\OvertureSource\dependancies\include

Test Build 2 saved under c:\OvertureSource\OALWrapper\Buildlog\Buildlog2.html
errors:
.\sources\OAL_OggStream.cpp(154) : error C2065: 'OV_CALLBACKS_DEFAULT' : undeclared identifier
.\sources\OAL_OggSample.cpp(61) : error C2065: 'OV_CALLBACKS_DEFAULT' : undeclared identifier

What i've done to try and fix:
OAL_OggSample.h - added a define for OV_CALLBACKS_DEFAULT
OAL_OggStream.h - added a define for OV_CALLBACKS_DEFAULT

this resolved the issue with the defines but created another issue:
.\sources\OAL_OggSample.cpp(62) : error C2143: syntax error : missing ';' before '{
so line 61 now looks like:
if((lOpenResult = ov_open_callbacks(fileHandle, &ovFileHandle, NULL, 0, OV_CALLBACKS_DEFAULT))<0);
now issue is this:
.\sources\OAL_OggSample.cpp(61) : error C2059: syntax error : ')'
.\sources\OAL_OggStream.cpp(154) : error C2059: syntax error : ')'
looks like i have an additional ")" but there are the correct amount.

cannot seem to get past this point.

Alex
09-23-2012, 07:00 PM
Find Reply
Urkle Offline
FG - Associate

Posts: 1,172
Threads: 31
Joined: Jul 2006
Reputation: 21
#2
RE: Compiling OALwrapper in VS2008

(09-23-2012, 07:00 PM)Vasator Wrote: What i've done to try and fix:
OAL_OggSample.h - added a define for OV_CALLBACKS_DEFAULT
OAL_OggStream.h - added a define for OV_CALLBACKS_DEFAULT

this resolved the issue with the defines but created another issue:
.\sources\OAL_OggSample.cpp(62) : error C2143: syntax error : missing ';' before '{
so line 61 now looks like:
if((lOpenResult = ov_open_callbacks(fileHandle, &ovFileHandle, NULL, 0, OV_CALLBACKS_DEFAULT))<0);
now issue is this:
.\sources\OAL_OggSample.cpp(61) : error C2059: syntax error : ')'
.\sources\OAL_OggStream.cpp(154) : error C2059: syntax error : ')'
looks like i have an additional ")" but there are the correct amount.

cannot seem to get past this point.

Alex
OV_CALLBACKS_DEFAULT is defined in vorbisfile.h in newer libvorbis headers. If you are still getting undeclared identifier I'd be checking to ensure that you don't have another older vorbisfile.h somewhere that VC++ is using instead.

Developing away on one of
Multiple Macs running 10.6, 10.7, 10.8, and 10.9.
Linux, 8-core AMD, 8GB RAM, Fedora 18, nVidia 450 1GB
09-23-2012, 10:29 PM
Website Find Reply
Vasator Offline
Junior Member

Posts: 10
Threads: 1
Joined: Nov 2010
Reputation: 0
#3
RE: Compiling OALwrapper in VS2008

(09-23-2012, 10:29 PM)Urkle Wrote:
(09-23-2012, 07:00 PM)Vasator Wrote: What i've done to try and fix:
OAL_OggSample.h - added a define for OV_CALLBACKS_DEFAULT
OAL_OggStream.h - added a define for OV_CALLBACKS_DEFAULT

this resolved the issue with the defines but created another issue:
.\sources\OAL_OggSample.cpp(62) : error C2143: syntax error : missing ';' before '{
so line 61 now looks like:
if((lOpenResult = ov_open_callbacks(fileHandle, &ovFileHandle, NULL, 0, OV_CALLBACKS_DEFAULT))<0);
now issue is this:
.\sources\OAL_OggSample.cpp(61) : error C2059: syntax error : ')'
.\sources\OAL_OggStream.cpp(154) : error C2059: syntax error : ')'
looks like i have an additional ")" but there are the correct amount.

cannot seem to get past this point.

Alex
OV_CALLBACKS_DEFAULT is defined in vorbisfile.h in newer libvorbis headers. If you are still getting undeclared identifier I'd be checking to ensure that you don't have another older vorbisfile.h somewhere that VC++ is using instead.

Okay, got it to compile! That's what it was somehow I must have downloaded two versions of libvorbis and extracted the wrong one. i had 1.1.0 and 1.3.3 downloaded. I don't even remember downloading 1.1.0 but there it was. replaced the vorbisfile.h file and edited the other files back to their original state.

I am going to write up a compile guide of my own as soon as I complete the process complete with screenshots for those of us like me who don't have that much experience with programming. I hope to learn a lot from this process as I learn better by doing than from a book but I do use books for reference.

Thanks for the assistance Urkle,

Alex
09-23-2012, 11:03 PM
Find Reply




Users browsing this thread: 1 Guest(s)