Sign in to follow this  
ToastFlambe

Building SDL_gfx for Mingw under Windows

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.
Quote:
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this