Jump to content
  • Advertisement
Sign in to follow this  
Mr Grinch

Linking Ogg Vorbis in Dev-C++

This topic is 5389 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to get my ogg vorbis code to compile in Dev-C++, but I am having lilnking troubles. I downloaded the OggVorbis-win32sdk-1.0.1 off of the official homepage. Everything compiles fine, I'm just having linking issues. If I link with the non-static libs (vorbisfile.lib, vorbis.lib, ogg.lib), it just crashes when I try to run it. I've heard from several people to use the static libs (vorbisfile_static.lib, vorbis_static.lib, ogg_static.lib), but if I try to use them, I get all kinds of linker troubles. First off, I get lots of warnings about ".drectve `%.*s' unrecognized". More importantly, I get lots of errors like:
[Linker error] undefined reference to `_alldiv'
[Linker error] undefined reference to `_allmul'
[Linker error] undefined reference to `_alloca_probe'
[Linker error] undefined reference to `_allshr'
[Linker error] undefined reference to `_chkstk'
Does anyone know what I'm doing wrong? It seems like I must not be linking a library that I need, but I don't know which to add. I'd appreciate any help you could give me. Thanks.

Share this post


Link to post
Share on other sites
Advertisement
I don't really know for sure, but maybe those static libraries were compiled with a different compiler/linker and that is what is causing problems? Could this be? I have heard of different compilers not liking eachother's code.

Share this post


Link to post
Share on other sites
Quote:
Original post by smart_idiot
Libraries for GCC should look like: libname.a


You can use .lib but the easiest way to get Vorbis to work with Dev-C++ is to compile it from the configure script using MSYS.

Share this post


Link to post
Share on other sites
I'm sorry I didn't reply to this sooner, I was out of town for a wedding. pkelly83, can you explain a little more? I'm unfamiliar with MSYS...

Share this post


Link to post
Share on other sites
Quote:
Original post by Mr Grinch
I'm sorry I didn't reply to this sooner, I was out of town for a wedding. pkelly83, can you explain a little more? I'm unfamiliar with MSYS...


MSYS can be found at mingw.org. It's a minimal bash shell that can be run on Windows to allow you to more easily work with gcc and other command line tools from the Linux world.

When you install MSYS, it will ask you if you would like to run the post-install process to sync with an existing MingW installation. You will want to do this. You have MingW installed in your Dev-C++ directory somewhere. The post-install will ask you for your mingw root directory. I've not used MSYS with Dev-C++, but I would guess that you should give the Dev-C++ root directory in this case.

MSYS is very useful when you use MingW for development.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!