mingw-cross-env-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mingw-cross-env-list] Linking error with SDL_image


From: Pierre-Henri Trivier
Subject: Re: [Mingw-cross-env-list] Linking error with SDL_image
Date: Tue, 27 Oct 2009 13:37:17 +0100

Thanks Volker

 actually I kept fooling around with the options and just yesterday I ended up with the set of libs you gave me.

Just a question : when cross-building sdl_image, would it be possible to customize the build to remove the support for tiff and jpeg ? 

Anyway, thanks again for the reply.

Cheers
PH

2009/10/27 Volker Grabsch <address@hidden>
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





--
"Message ludique et non scientifique"
"Pour votre santé, réflechissez au moins cinq fois par jour"
"L'abus de connerie est dangereux pour la santé : soyez cons avec modération"
(Ceci était un message de l'Institut National de Prévention Contre la Connerie et de Soutien aux Cons et Non-Comprenants)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]