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: Sun, 14 Feb 2010 17:23:25 +0100

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.

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.

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).

Finally, I don't know if this is the proper place to ask, but I can't seem to get the proper set of lib flags needed to cross-compile against SDL_mixer.... with the following line :

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

I still get :

/home/phtrivier/src/mingw-cross-env-trunk/usr/i686-pc-mingw32/lib/libSDL_mixer.a(dynamic_ogg.o): In function `Mix_InitOgg':
/home/phtrivier/src/mingw-cross-env-trunk/tmp-sdl_mixer/SDL_mixer-1.2.11/dynamic_ogg.c:106: undefined reference to `_ov_clear'
/home/phtrivier/src/mingw-cross-env-trunk/tmp-sdl_mixer/SDL_mixer-1.2.11/dynamic_ogg.c:107: undefined reference to `_ov_info'
/home/phtrivier/src/mingw-cross-env-trunk/tmp-sdl_mixer/SDL_mixer-1.2.11/dynamic_ogg.c:108: undefined reference to `_ov_open_callbacks'
/home/phtrivier/src/mingw-cross-env-trunk/tmp-sdl_mixer/SDL_mixer-1.2.11/dynamic_ogg.c:109: undefined reference to `_ov_pcm_total'
/home/phtrivier/src/mingw-cross-env-trunk/tmp-sdl_mixer/SDL_mixer-1.2.11/dynamic_ogg.c:110: undefined reference to `_ov_read'
/home/phtrivier/src/mingw-cross-env-trunk/tmp-sdl_mixer/SDL_mixer-1.2.11/dynamic_ogg.c:111: undefined reference to `_ov_time_seek'
/home/phtrivier/src/mingw-cross-env-trunk/usr/i686-pc-mingw32/lib/libSDLmain.a(SDL_win32_main.o): In function `console_main':
/home/phtrivier/src/mingw-cross-env-trunk/tmp-sdl/SDL-1.2.14/./src/main/win32/SDL_win32_main.c:315: undefined reference to `_SDL_main'

Anyway, thanks for the help ...

PH

On 12 January 2010 16:28, Volker Grabsch <address@hidden> wrote:
Pierre-Henri Trivier <address@hidden> schrieb:
> The project is available on github ( git://github.com/phtrivier/ube.git ),
> but I'll try and reduce things if possible...

That isn't necessary. I already found some issues. I don't want to
go into details unless someone is really interested at that. In short:

   * Don't use AM_PATH_SDL.
   * Try to avoid AC_SEARCH_LIBS and AC_CHECK_LIBS.
   * Use PKG_CHECK_MODULES wherever possible.

In your concrete case, you can check for SDL, SDL_image and SDL_mixer
via pkg-config. The only problem is SDL_ttf which doesn't provide a
pkg-config entry, so it has to be checked the "old way".

So I recommend to put into your configure.ac something along the lines:

   PKG_CHECK_MODULES([SDL],       [sdl >= 1.2.13], ...SUCCESS..., ...FAILURE...)
   PKG_CHECK_MODULES([SDL_image], [SDL_image],     ...SUCCESS..., ...FAILURE...)
   PKG_CHECK_MODULES([SDL_mixer], [SDL_mixer],     ...SUCCESS..., ...FAILURE...)
   AC_CHECK_LIB(SDL_ttf, TTF_OpenFontRW, ...SUCCESS..., ...FAILURE...)


> * I am compiling with autotools, configuring with :
>
> configure --prefix --host=i686-pc-mingw32 --build=i686-pc-linux-gnu

It should be sufficient to do:

   ./configure --host=i686-pc-mingw32

Have a look at the tutorial "Step 5a" for more information.
http://mingw-cross-env.nongnu.org/#tutorial


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]