On Mon, 17 Sep 2012 13:43:46 -0700 Ian Lance Taylor <iant@xxxxxxxxxx> wrote: > On Mon, Sep 17, 2012 at 12:23 PM, YuGiOhJCJ Mailing-List > <yugiohjcj-mailinglist@xxxxxxxxxxx> wrote: > > > $ make > > /bin/sh ./libtool --mode=link i686-pc-mingw32-gcc -o build/libSDL_mixer.la build/effect_position.lo build/effect_stereoreverse.lo build/effects_internal.lo build/load_aiff.lo build/load_voc.lo build/mixer.lo build/music.lo build/wavestream.lo build/common.lo build/ctrlmode.lo build/filter.lo build/instrum.lo build/mix.lo build/output.lo build/playmidi.lo build/readmidi.lo build/resample.lo build/sdl_a.lo build/sdl_c.lo build/tables.lo build/timidity.lo build/native_midi_common.lo build/native_midi_mac.lo build/native_midi_macosx.lo build/native_midi_win32.lo build/dynamic_mp3.lo build/version.o -mwindows -L/usr/i686-pc-mingw32/lib -lmingw32 -lSDLmain -lSDL -lwinmm -L/usr/lib -lsmpeg -mwindows -L/usr/i686-pc-mingw32/lib -lmingw32 -lSDLmain -lSDL -lm -no-undefined -rpath /usr/i686-pc-mingw32/lib -release 1.2 -version-info 12:0:12 > > > > *** Warning: Linking the shared library build/libSDL_mixer.la against the non-libtool > > *** objects build/version.o is not portable! > > libtool: link: i686-pc-mingw32-gcc -shared build/.libs/effect_position.o build/.libs/effect_stereoreverse.o build/.libs/effects_internal.o build/.libs/load_aiff.o build/.libs/load_voc.o build/.libs/mixer.o build/.libs/music.o build/.libs/wavestream.o build/.libs/common.o build/.libs/ctrlmode.o build/.libs/filter.o build/.libs/instrum.o build/.libs/mix.o build/.libs/output.o build/.libs/playmidi.o build/.libs/readmidi.o build/.libs/resample.o build/.libs/sdl_a.o build/.libs/sdl_c.o build/.libs/tables.o build/.libs/timidity.o build/.libs/native_midi_common.o build/.libs/native_midi_mac.o build/.libs/native_midi_macosx.o build/.libs/native_midi_win32.o build/.libs/dynamic_mp3.o build/version.o -L/usr/i686-pc-mingw32/lib -L/usr/lib /usr/lib/libsmpeg.so /usr/lib/libSDL.so -ldl -lvga -lpthread /usr/lib/libstdc++.so -lmingw32 /usr/i686-pc-mingw32/lib/libSDLmain.a /usr/i686-pc-mingw32/lib/libSDL.dll.a -luser32 -lgdi32 -lwinmm -mwindows -mwindows -pthread -o build/.libs/SDL_mixer.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker build/.libs/libSDL_mixer.dll.a > > /usr/lib/libsmpeg.so: could not read symbols: File in wrong format > > collect2: error: ld returned 1 exit status > > make: *** [build/libSDL_mixer.la] Error 1 > > > > Do you see how to resolve this? > > You are using a cross-compiler, but are passing -L /usr/lib. That > can't work, as the libraries in /usr/lib are not cross libraries; they > are native libraries. > > I don't know where the -L /usr/lib came from, but that is the problem > you need to fix. > Yes true. OK I found the corresponding option and I cross compiled libsmpeg. Now that's what I have: $ export PKG_CONFIG_PATH=/usr/i686-pc-mingw32/lib/pkgconfig $ ./configure --prefix=/usr/i686-pc-mingw32 --host=i686-pc-mingw32 --with-smpeg-prefix=/usr/i686-pc-mingw32 --disable-music-mod $ make /bin/sh ./libtool --mode=link i686-pc-mingw32-gcc -o build/playwave.exe build/playwave.lo -D_GNU_SOURCE=1 -Dmain=SDL_main -I/usr/i686-pc-mingw32/include/SDL -mwindows -L/usr/i686-pc-mingw32/lib -lmingw32 -lSDLmain -lSDL build/libSDL_mixer.la libtool: link: i686-pc-mingw32-gcc -o build/.libs/playwave.exe build/.libs/playwave.o -D_GNU_SOURCE=1 -Dmain=SDL_main -I/usr/i686-pc-mingw32/include/SDL -mwindows -L/usr/i686-pc-mingw32/lib build/.libs/libSDL_mixer.dll.a /usr/i686-pc-mingw32/lib/libSDLmain.a /usr/i686-pc-mingw32/lib/libstdc++.dll.a -lmingw32 /usr/i686-pc-mingw32/lib/libSDL.dll.a -luser32 -lgdi32 -lwinmm -L/usr/i686-pc-mingw32/lib /usr/i686-pc-mingw32/lib/libmingw32.a(main.o): In function `main': /home/yugiohjcj/documents/downloads/software/mingwrt-3.15.2-mingw32/main.c:73: undefined reference to `WinMain@16' collect2: error: ld returned 1 exit status make: *** [build/playwave.exe] Error 1 So I have an undefined reference and what is strange is I can see the path /home/yugiohjcj/documents/downloads/software/mingwrt-3.15.2-mingw32/main.c which is the place where I built myself mingwrt. At this time, this path doesn't exist anymore. I see no reason this path is displayed on my screen... Do you understand this error message ?