Attempting to Cross-compile SDL_image with mingw on a linux host
Hi all,
I've written a few applications with SDL, and recently I've taken interest in porting them to win32 via mingw, hosted on my Slackware laptop. I downloaded and installed mingw to my home directory, and I also downloaded the mingw32 SDL development pacakge ("SDL-devel-1.2.14-mingw32.tar.gz") from the SDL website. After installing it with proper prefixes, I can compile SDL programs with mingw and run them on a Windows box. However, I'm having less luck with programs that use both SDL and SDL_image. There's no mingw32 development package on the SDL_image site as there is on the SDL site, so I'm a bit confused on how to proceed. Should I download the source package and compile it with mingw? If so, how? The typical ./configure, make, make install uses gcc, not i686-pc-mingw-gcc, and attempting to specify it causes the configure script to complain that the compiler doesn't create valid binaries. I've tried compiling with gcc and setting the prefixes to my mingw installation; I'm getting no luck with that, and I suspect it's the wrong road to take. I would greatly appreciate any hints. Thanks, Eupator |
Download the visual C SDL image dev-kit.
|
Quote:
Code:
$ /home/me/mingw32/usr/bin/i686-pc-mingw32-gcc -o SDL_test.exe main.c `/home/me/mingw32/bin/sdl-config --cflags --libs` -lSDL_image Code:
#include<stdio.h> |
|
Quote:
Code:
/tmp/ccMdPNbq.o:main.c:(.text+0x3a): undefined reference to `_IMG_LoadTyped_RW' |
Add the flag -lSDLimage (or was it -lSDLImage) to the compiler / linker command line.
|
Quote:
|
All times are GMT -5. The time now is 08:12 PM. |