Crosscompiling

Hi,

By the use of the xmingw32-crosscompilers I managed to build libpng, libttf and
zlib as static libs (when I am sure that these work I will publish the build
libs…)

However I cannot link my program. The code is C++, so I invole g++ to do the
linking, however this fails, since it wants to link libm, without being told so.
When I use cc, as in the SDL-demos, I get trillions of unresolved links most of
them are template functions from the STL, the others are calls to iostream,
strstream, etc.

I assume using g++ to invoke the linker is the right way, however this damned
libm !–
Karsten-O. Laux
klaux at student.uni-kl.de
http://www.rhrk.uni-kl.de/~klaux
UIN 21614933 (Bert)

Hey, I got it.
I have to invoke cc with my static libs and pass"-lstdc++" to the linker, so
that the standard c++ lib gets linked…

well and it works ! MingW32 is very cool, I was concerned about the “/” within
the pathnames …but no problem : mingw32 changes this transparently, very cool.

cuOn Sat, 06 Mar 1999, you wrote:

Hi,

By the use of the xmingw32-crosscompilers I managed to build libpng, libttf and
zlib as static libs (when I am sure that these work I will publish the build
libs…)

However I cannot link my program. The code is C++, so I invole g++ to do the
linking, however this fails, since it wants to link libm, without being told so.
When I use cc, as in the SDL-demos, I get trillions of unresolved links most of
them are template functions from the STL, the others are calls to iostream,
strstream, etc.

I assume using g++ to invoke the linker is the right way, however this damned
libm !


Karsten-O. Laux
klaux at student.uni-kl.de
http://www.rhrk.uni-kl.de/~klaux
UIN 21614933 (Bert)

Hey, I got it.
I have to invoke cc with my static libs and pass"-lstdc++" to the linker, so
that the standard c++ lib gets linked…

Great, this should go into the FAQ.

well and it works ! MingW32 is very cool, I was concerned about the “/” within
the pathnames …but no problem : mingw32 changes this transparently, very cool.

Actually, Win32 does this internally. :slight_smile:

-Sam Lantinga				(slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
Author of Simple DirectMedia Layer -
http://www.devolution.com/~slouken/SDL/

Hello,
I’ve been searching through the internet to find out if that’s possible:
I’m currently building an sdl-based application for windows, linux and
macos x. The problem is that I need to be able to compile all three
binaries on my good old linux-box. The linux and Windows part where
quite easy to get to work but macos seems to be quite a problem.
Can anybody point me to a howto, a mailinglist post, … how to set up
gcc to give me macos x binaries.
thx
Jochen–
jochen <@jochen>