Question

I've got a project and I'm trying to make it read a .OGG file. I've downloaded the libogg and libvorbis from here, compiled them (had some trouble figuring I had to build libogg first), then got the following files:

libogg.lib
libogg.dll
libvorbis.lib
libvorbis.dll
libvorbisfile.lib
libvorbisfile.dll

I dragged all of them in my project's Libraries folder, already added to the project, and included them in the Linker->Input (only the .lib).

Next I copied the headers to my project's Includes folder, also already added to the project, with the files:

ogg/ogg.h
ogg/os_types.h

vorbis/codec.h
vorbis/vorbisenc.h
vorbis/vorbisfile.h

Then I added some code, and I get the error "The program can't start because libvorbisfile.dll is missing from the computer." And I'm pretty sure the file IS in the Library folder and properly defined in the properties.

Did I do something wrong along the way? How can I figure what is wrong so I can fix it?

I already tried putting the .dll in the project's folder and in the Windows/System32 folder as well, didn't work.

Was it helpful?

Solution

The library folder is fine for your .lib files, but it's looking for the .dll at run time, which your project settings have no effect on. Windows looks in a few places for a .dll, but the easiest way to get your program to run is to put the .dlls in your working directory, which is where ever you run your executable from (probably the same directory as the .exe file).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top