Jump to content
  • Advertisement
Sign in to follow this  

Building SDL_gfx for Mingw under Windows

This topic is 4117 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

The download site is here I'll admit, I don't understand the directions (they're near the bottom of the page). I'm using code::blocks with the default MingW32 compiler under Windows XP. To me, it seems like I need to use the xmingw32 cross compiler, but I'm not sure.
To create a Windows DLL using the xmingw32 cross-compiler: cross-configure cross-make cross-make install
However, I'm not sure a) Which one of the files at the top of the page I'm supposed to download b) What to put after the commands Thanks for any help.

Share this post

Link to post
Share on other sites
You need SDL_gfx-2.0.13.zip or SDL_gfx-2.0.13.tar.gz, i think they are the same.

You could do it in the following way:

- Set up a project like you would normally do for SDL but don't create any files.
- Unpack the file you downloaded, you should see some header and source files there, add these to your project.
- Go to projects->properties->targets and select 'dynamic library' as the type. Then find the checkbox 'create import library' and make sure it's checked. Rename the output filename to SDL_gfx.dll (or whatever).
- Still in this dialog go to build options. Under the #defines tab type in 'BUILD_DLL'. (I think there are other symbols you can define, such as whether to use MMX or some stuff like that. Just scan the headers or read the doc for it if you want, I don't think you need it).
- Select some compiler flags. I always check these: optimize fully | expensive optimizations | strip all symbols from binary.

If you build it now, you should end up with libSDL_gfx.a and SDL_gfx.dll.
Good luck.

EDIT: just wanted to clarify: you don't need the cross compiler.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!