[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Mingw-cross-env-list] Linking error with SDL_image
From: |
Volker Grabsch |
Subject: |
Re: [Mingw-cross-env-list] Linking error with SDL_image |
Date: |
Tue, 27 Oct 2009 11:01:00 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Dear PH,
Thanks for your interest in mingw-cross-env. The problems you are
encountering are due to the fact that SDL_image doesn't provide
proper pkgconfig configuration files.
For instance, when using SDL you can get all necessary options by
simply typing:
i686-pc-mingw32-pkg-config sdl --libs
BTW, this is done automatically for you if you use Autoconf in
your project. It will use the 'i686-pc-mingw32' prefix to use
the cross-compiling "i686-pc-mingw32-pkg-config" instead of the
native "pkg-config".
However, SDL_image doesn't provide that, so you have to figure
out the needed compiler and linker flags by yourself.
Pierre-Henri Trivier <address@hidden> schrieb:
> 386-mingw32msvc-g++ -g -O2 -o ube.exe ube.o ../engine/libube-engine.a
> libube-client.a -llua -lm -lintl -liconv
> -L/home/phtrivier/sandbox/src/mingw-cross-env-2.8/usr/i386-mingw32msvc/lib
> -lmingw32 -lSDLmain -lSDL -lwinmm -mwindows -lSDL_image
[...]
> I tried a few combinations of manually adding some other libraries (-lpng,
> -ljpeg, -lz, -ltiff, -ltiffxx ...) but could not come to a set that worked.
I think you should add the following options:
-ltiff -ljpeg -lpng -lz
Note that the order is important!
Greets,
Volker
--
Volker Grabsch
---<<(())>>---
Administrator
NotJustHosting GbR