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

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

[Mingw-cross-env-list] OS X 10.13 and linking error


From: Dominik Reichardt
Subject: [Mingw-cross-env-list] OS X 10.13 and linking error
Date: Fri, 19 Jan 2018 19:49:47 +0100

Hi all,

so I am a new user of mxe on OS X 10.13. My goal is to be able to build Exult (exult.sf.net) to test stuff for Windows as well. I’m building Exult for years now on OS X for ppc and intel.

So I followed the tutorial, using MacPorts and making sure the requirements were all installed. 

Then I put the mxe source in /opt/mxe and installed:
cc libtool autotools sdl2 vorbis ogg libpng zlib

Because I ran into the same problem as outlined before I also added i686-w64-mingw32.shared to the setting and in the below I’m referencing this but the problem was the same for static.

Then I started a new terminal instance unset the environment as in your tutorial and used 
export PATH=/opt/mxe/usr/bin/:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

(and export EXPACK=/opt/x86_64/expack
export HEAD2DATA=/opt/x86_64/head2data
<- these are binaries needed to build data files for Exult and Exult’s configure recognizes a crosscompile and use these to generate the data files)

then cd to the exult source, ran ./autogen.sh and
./configure --host=i686-w64-mingw32.shared --disable-opengl --disable-all-hq-scalers --with-sdl=sdl2 --disable-nxbr --disable-fluidsynth --disable-mt32emu --disable-tools --disable-compiler --disable-oggtest --disable-vorbistest --disable-alsa  --disable-timidity-midi --with-sdl-prefix=/opt/mxe/usr/i686-w64-mingw32.shared
then make. 
The .o files were getting compiled but on the first linking stage of linking an .a file from the .o files it produced an error:

/bin/sh ../libtool  --tag=CXX   --mode=link i686-w64-mingw32.shared-g++ -std=c++11     -o rwregress.exe rwregress.o libu7file.la -lwinmm -lstdc++ 
libtool: link: i686-w64-mingw32.shared-g++ -std=c++11 -o rwregress.exe rwregress.o  ./.libs/libu7file.a -lwinmm /opt/mxe/usr/lib/gcc/i686-w64-mingw32.shared/5.4.0/libstdc++.dll.a -L/opt/mxe/usr/lib/gcc/i686-w64-mingw32.shared/5.4.0 -L/opt/mxe/usr/lib/gcc/i686-w64-mingw32.shared/5.4.0
/opt/mxe/usr/lib/gcc/i686-w64-mingw32.shared/5.4.0/../../../../i686-w64-mingw32.shared/lib/../lib/libmingw32.a(lib32_libmingw32_a-crt0_c.o): In function `main':
/opt/mxe/tmp-gcc-i686-w64-mingw32.shared/gcc-5.4.0.build_/mingw-w64-v5.0.3/mingw-w64-crt/crt/crt0_c.c:18: undefined reference to address@hidden'
collect2: error: ld returned 1 exit status

the config.log of Exult’s configure is at https://www.dropbox.com/s/fs6921ordhtm37j/config.log?dl=0

Things I needed to do: keep MacPorts bin in the path or autogen.sh was failing because the autotools and libtool can’t be found. And I can’t find them in /opt/mxe/usr as well.
In Exult’s configure I needed to pass the SDL2 prefix, since $HOST-sdl2-config isn’t something Exult’s configure looks for.

Any idea where I’m going wrong?

Thanks and take care

Dominik

reply via email to

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