# Ogg and OpenAL[SOLVED]

## Recommended Posts

So im trying to run the SimpleOgg article example program. At first It tells me the theres a problem with the functions alutInit() and alutExit() SO i link in the libs and now I get linker errors on pretty much every ov_ call that is used. The compiler can obviously not find the functions in question. I cant seem to figure out what is wrong or what i am forgetting to do. Perhaps my libs are out of date or the ones used in the article were. I link in the libs: OpenAL32.lib alut.lib ogg.lib vorbis.lib vorbisenc.lib and i have tried the static libs as well to no avail. i have also added the includes for ogg.h, vorbisenc.h, and codec.h. three of seven linkers below..the others are the same for different function calls: SimpleOGG error LNK2019: unresolved external symbol __imp__alutExit referenced in function _main SimpleOGG error LNK2019: unresolved external symbol _ov_clear referenced in function "void __cdecl LoadOGG(char *,class std::vector<char,class std::allocator<char> > &,int &,unsigned int &)" (?LoadOGG@@YAXPADAAV?$vector@DV?$allocator@D@std@@@std@@AAHAAI@Z) SimpleOGG error LNK2019: unresolved external symbol _ov_read referenced in function "void __cdecl LoadOGG(char *,class std::vector<char,class std::allocator<char> > &,int &,unsigned int &)" (?LoadOGG@@YAXPADAAV?$vector@DV?$allocator@D@std@@@std@@AAHAAI@Z) [Edited by - Tang of the Mountain on August 2, 2005 12:56:39 PM]

##### Share on other sites
ferr    194
//include OpenAL-specific headers#include "alc.h"#include "alut.h"

Glanced at an OpenAL example I used a while back and saw that, maybe you need it also.

##### Share on other sites

#include <AL/al.h>
#include <AL/alut.h>
#include <AL/alc.h>
#include <AL/alctypes.h>
#include <AL/altypes.h>
#include <ogg/ogg.h>
#include <vorbis/vorbisenc.h>
#include <vorbis/codec.h>
#include <vorbis/vorbisfile.h>

these are my al and ogg speceific includes

##### Share on other sites
Spudder    385
Try linking to vorbisfile as well, that's what the ov_XXX functions are part of.

##### Share on other sites
schweet...that worked for the ov_XXX funcs....but im still getting linker errors on alutExit() and alutInit()

I just downloaded the beta SDK for the includes and libs...could this be causeing the problem...maybe there is a version that i am unaware of that i should have instead of the windows beta sdk?

##### Share on other sites
Ok...I solved this...the problem seemed to be my SDK. I went to openal.org and downloaded the beta sdk. Overwrote my current .h files and .libs and rebuilt....SUCCESS! the beta version is beta for a reason i guess.

Then, I was crashing on ov_open...so i switched out the .libs for XXX_static.lib on all ogg vorbis libraries nd vwalla(sp?) i get a bomb sound...thanks to all for your help.