Cannot generate libraries for libvorbis.

Started by
1 comment, last by Alberth 7 years, 10 months ago

(SOLVED.) My brain has been melting trying to figure out how to get these two libraries to compile. It is ironic considering these are so incredibly popular in the game industry T_T.

I am trying to compile for windows with MinGW32, so that I can use the static libraries (.a files) for Eclipse (Oh boy, you know where this is going.).

I already have makeconf installed for msys, so that I can get the makefiles for libvorbis, however things aren't going as planned. I tried using bash and managed to successfully create the makefile for libogg, and I generated the .a file. However, when trying to do the same for libvorbis, I get the following error after typing './configure':

"Configure: Error: must have ogg installed!"

I'm not sure how I am supposed to get around this. I heard that you are supposed to use ldconfig to fix the issue, but that is a linux program. I am lost here. Does anyone have a build of libvorbis.a? It might be easier to just get the library directly, but I cannot find a download.

I know that there should be hundreds of indie game developers who have used ogg's in their games. Surely someone should know what to do. Please help!

EDIT: This site helped me generate the make file: https://www.daniweb.com/programming/software-development/threads/269305/anyone-have-ever-successful-compiled-libvorbis

using ./configure --with-ogg-libraries=/usr/local/lib --with-ogg-includes=/usr/local/includes/ogg --disable-oggtest

However, the makefile gives an error when using make.

Fatal error: ogg/ogg.h: No such file or directory.

I even tried adding it to my PATH variables, but that didn't fix it.

View my game dev blog here!

Advertisement

I have done it. I have officially done it!

For both static and dynamic libraries:

All I had to do was replace '/usr/local/lib' with 'C:\Users\NULL\Downloads\libogg\src\.libs', and '/usr/local/includes/ogg' with 'C:\Users\NULL\Downloads\libogg\include'.

I honestly didn't think it would work, but I was lucky :P.

For anyone who was struggling with this, I will sum it up in this small tutorial :):

Step 1: Make sure you have mingw and msys installed correctly. Bash should have been installed along with msys. It should be in the bin folder. Make sure bash is in your PATH variable as well.

Step 2: Open cmd.exe, and type 'mingw-get install msys-automake'. This will install the mingw safe version of automake, which you will need to use the './configure' command to generate make files from .in files.

Step 3: Download libogg and libvorbis online. It should be easy to find. Start with libogg, and go to their main directory (using cd of course). Type bash to enable the bash UNIX shell, and then type ./configure to create the makefiles for libogg. Then, type make to create the lib files, which should be under ../src/.libs.

Step 4: Do the same for libvorbis, except type './configure --with-ogg-libraries=C:\Users\YourNameHere\Downloads\libogg\src\.libs --with-ogg-includes='C:\Users\YourNameHere\Downloads\libogg\include --disable-oggtest'.

It's a lot to type, but it should get the job done.

Step 5: Lastly, type make, and you should also have the libraries for libvorbis under ../lib/.libs.

For Static libraries only:

Step 1: Make sure you have mingw and msys installed correctly. Bash should have been installed along with msys. It should be in the bin folder. Make sure bash is in your PATH variable as well.

Step 2: Open cmd.exe, and type 'mingw-get install msys-automake'. This will install the mingw safe version of automake, which you will need to use the './configure' command to generate make files from .in files.

Step 3: Download libogg and libvorbis online. It should be easy to find. Start with libogg, and go to their main directory (using cd of course). Type bash to enable the bash UNIX shell, and then type ./configure --prefix=c:/mingw --disable-shared to create the makefiles for libogg. Then, type make, press enter, and then type make install and press enter to create the lib files, which should be under ../src/.libs.

Step 4: Do the same for libvorbis. you should also have the libraries for libvorbis under ../lib/.libs.

----------------------------

Also, make sure the libraries are in the correct order!

vorbisenc

vorbisfile

vorbis

ogg

Credit: https://www.allegro.cc/forums/thread/555804

Now you can use ogg files in your game for music/sound effects without paying thousands of dollars for visual studio :D!

View my game dev blog here!

Great that you got it running.

./configure is generally the defacto standard build system of autotools, pretty much every old-school Unix program uses it.

It comes with a help system "./configure --help" that explains what options you have, and what they do (unlike some other build systems, /me looks at cmake and scons).

This topic is closed to new replies.

Advertisement