Frictional Games Forum (read-only)
Compiling OALwrapper in VS2008 - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Open Source Collaboration (https://www.frictionalgames.com/forum/forum-27.html)
+--- Forum: OALWrapper (https://www.frictionalgames.com/forum/forum-30.html)
+--- Thread: Compiling OALwrapper in VS2008 (/thread-18469.html)



Compiling OALwrapper in VS2008 - Vasator - 09-23-2012

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


RE: Compiling OALwrapper in VS2008 - Urkle - 09-23-2012

(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.


RE: Compiling OALwrapper in VS2008 - Vasator - 09-23-2012

(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