Attempting to Cross-compile SDL_image with mingw on a linux host
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
Could you elaborate? I downloaded SDL_image-devel-1.2.10-VC.zip from http://www.libsdl.org/projects/SDL_image/ . I tried compiling it with gcc and installing to my mingw directory, but cross compiling still fails:
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
/tmp/cc8ukDpN.o:main.c:(.text+0x1a): undefined reference to `_IMG_Load'
collect2: ld returned 1 exit status
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.