Skip to main content
GameDev.net gamedev.net
🔒 Locked

Building SDL_gfx for Mingw under Windows

Started by ToastFlambe Jun 6, 2006 at 3:51 PM 2 replies 11.4k views
Original Post
ToastFlambe
ToastFlambe
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.
DeadXorAlive
DeadXorAlive
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.
ToastFlambe
ToastFlambe
That was exceedingly easy. Thanks alot. Definately rate++ for you.
finky45
finky45
+++++++

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.