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

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

Re: Fwd: [Mingw-cross-env-list] Error compiling source file including <s


From: Pierre-Henri Trivier
Subject: Re: Fwd: [Mingw-cross-env-list] Error compiling source file including <string.h>
Date: Tue, 16 Feb 2010 16:56:22 +0100

I'm progressing.In the development release, I can use PKG_CHECK_MODULES to help locate some of the libs

In my configure.ac

PKG_CHECK_MODULES([SDL], [sdl >= 1.2.13], , )
PKG_CHECK_MODULES([SDL_image], [SDL_image])
PKG_CHECK_MODULES([SDL_mixer], [SDL_mixer])

AC_SEARCH_LIBS(TTF_OpenFontRW, SDL_ttf, , 
      AC_MSG_WARN([*** Unable to find SDL_ttf library.
         Are you cross compiling ?]))


In my Makefile.am : 

SDL_TTF_LIBS = -lSDL_ttf -lfreetype

ube_LDADD=libube-client.a \
../engine/libube-engine.a \
../common/libube-common.a \
-lpopt \
$(SDL_LIBS) $(SDL_image_LIBS) $(SDL_TTF_LIBS) $(SDL_mixer_LIBS)  \
$(LUA_LIB) $(LIBINTL) 

(I still have to define SDL_TTF_LIBS as it does not have a pkg config yet)

Then i get the (rather big) link line (cut down for clarity) :

 i686-pc-mingw32-g++  -g -O2   -o ube.exe ube.o libube-client.a ../engine/libube-engine.a ../common/libube-common.a 
-lpopt 
-mwindows -L/home/phtrivier/sandbox/mingw-cross-env-trunk/usr/i686-pc-mingw32/lib 
-lSDL_image -ltiff -ljpeg -lmingw32 -lSDLmain -lSDL -liconv -lm -luser32 -lgdi32 -lwinmm -ldxguid -lpng14 -lz 
-lSDL_ttf -lfreetype 
-mwindows -L/home/phtrivier/sandbox/mingw-cross-env-trunk/usr/i686-pc-mingw32/lib 
-lSDL_mixer -lmikmod -lpthread -lws2_32 -lsmpeg -lstdc++ -lmingw32 
-lSDLmain -lSDL -liconv -luser32 -lgdi32 
-lwinmm -ldxguid -lvorbisfile -lvorbis -lm -logg   
-llua  -lm -lintl -liconv

And I still get a link error : 

/home/phtrivier/sandbox/mingw-cross-env-trunk/usr/i686-pc-mingw32/lib/libSDLmain.a(SDL_win32_main.o): In function `console_main':
/home/phtrivier/sandbox/mingw-cross-env-trunk/tmp-sdl/SDL-1.2.14/./src/main/win32/SDL_win32_main.c:315: undefined reference to `_SDL_main'

Which is rather depressing as SDL_main is linked twice ;)

In another thread you mentionned you've been able to cross compile an app against SDL ... is this the proper link line I should get ? Or am I missing something again ? 

Thanks again for the help ! 

Regards
PH


On 14 February 2010 22:11, Volker Grabsch <address@hidden> wrote:
Pierre-Henri Trivier <address@hidden> schrieb:
> For info, the -I/usr/include was added by AX_BOOST_BASE. I fixed it by
> setting --with-boost and --with-boost-libdir at configure time.

Okay, that's good to know.

> As for the PKG_CHECK_MODULES, I can't use it because the version of
> SDL_image and SDL_mixer I have on my machine do not provide a pkg-config
> script.

Yes, it's a pity. :-(
I also just figured it out. See:

http://lists.gnu.org/archive/html/mingw-cross-env-list/2010-02/msg00056.html


> Also, when using PKG_CHECK_MODULES to cross compile, I don't get all the
> flags I need with SDL_image_LIBS and stuff (I have to manually add -jpeg and
> stuff).

This problem should be fixed now. Please upgrade to the latest
development version. Then the command

   i686-pc-mingw32-pkg-config SDL_image --libs

should produce the correct output. If it doesn't, please report
it to us, because in that case it's a bug in mingw-cross-env.


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]