Enzo wrote:
I can cross compile SDL sources to create SDL.DLL ?
If I do
PATH=/usr/local/cross-tools/i386-mingw32/bin:$PATH
./configure --host=i386-linux --target=i386-mingw32
make; make install
I obtain only these files (located in /usr/local/cross-tools/i386-mingw32/lib)
libSDL-1.1.so.0.3.0
libSDL.a
libSDL.la
libSDL.so → libSDL-1.1.so.0.3.0
Yes, of course I can find SDL.DLL in
SDL-devel-1.1.3-mingw32.tar.gz
but if I want cross-compile my own version of SDL.DLL, how can I do?
Thanks,
Enzo.
–
E-mail enzo.gupi at tiscalinet.it
Home page http://enzogupi.interfree.it
Did you try setting CC=i386-mingw32-gcc before you ran configure?
That might get it working. I say “might” because cross compiling
SDL is currently a big mess. The instructions are wrong, so if you
manage to build cross with it then count yourself lucky.
I have attached a patch to this email that would “fix” the current
SDL cvs if not for the fact that the cvs version of libtool that
I am using is completely busted so I will have to get it working
before I can actually test things out. You might be able to get
it working with an older version of libtool.
Mo DeJong
Red Hat Inc
-------------- next part --------------
Index: README.Win32===================================================================
RCS file: /cvs/SDL/README.Win32,v
retrieving revision 1.5.2.2
diff -u -r1.5.2.2 README.Win32
— README.Win32 2000/05/03 16:53:37 1.5.2.2
+++ README.Win32 2000/06/07 11:29:25
@@ -13,12 +13,12 @@
First, get an EGCS-based compiler for Win32, which can be found at:
http://www.devolution.com/~slouken/SDL/Xmingw32/index.html
- Once you have the compiler, and copied the DirectX headers if you want them,
- you are ready to build SDL for Win32. Make sure the cross-compiler is the
- first gcc in your PATH, perhaps like this (using bash):
- Once you have the compiler, and you have copied the DirectX headers if you
- want to use DirectX, you are ready to build SDL for Win32. Make sure the
- cross-compiler is on your PATH.
PATH=/usr/local/cross-tools/i386-mingw32/bin:$PATH
- and then (assuming you are running Linux on a PC):
- ./configure --host=i386-linux --target=i386-mingw32; make; make install
- If your cross compiler is named i386-mingw32msvc-gcc then use the folllowing:
- ./configure --host=i386-mingw32msvc ; make; make install
If you have already built SDL natively, you must do “make distclean”
before you build for Win32.
@@ -30,14 +30,14 @@
This is easy once you have built the libraries:
- cd test; ./configure --host=i386-linux --target=i386-mingw32; make
- cd test; ./configure --host=i386-mingw32msvc ; make
==============================================================================
III. Building the Simple DirectMedia Layer demo programs:
Go to the directory containing the demo you want to build and type:
- ./configure --host=i386-linux --target=i386-mingw32; make
- ./configure --host=i386-mingw32msvc ; make
Common problems:
1. The compiler complains about including <windows.h>
Index: configure.in
RCS file: /cvs/SDL/configure.in,v
retrieving revision 1.25.2.68
diff -u -r1.25.2.68 configure.in
— configure.in 2000/06/06 17:17:50 1.25.2.68
+++ configure.in 2000/06/07 11:29:26
@@ -1,6 +1,9 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(README)
+dnl Require version 2.14 of autoconf (needed for proper cross build support)
+AC_PREREQ(2.14)
+
dnl Set various version strings - taken gratefully from the GTk sources
Making releases:
@@ -37,12 +40,13 @@
AC_SUBST(LT_REVISION)
AC_SUBST(LT_AGE)
+dnl Detect the canonical host and build
+AC_CANONICAL_HOST
+AC_CANONICAL_BUILD
+
dnl Setup for automake
AM_INIT_AUTOMAKE(SDL, $SDL_VERSION)
-dnl Detect the canonical host and target build environment
-AC_CANONICAL_HOST
-AC_CANONICAL_TARGET
dnl Check for tools
@@ -52,7 +56,7 @@
AC_PROG_CC
AC_C_INLINE
AC_C_CONST
-case “$target” in
+case “$host” in
--beos*)
AC_PROG_CXX
;;
@@ -63,7 +67,7 @@
AC_PROG_INSTALL
dnl The alpha architecture needs special flags for binary portability
-case “$target” in
+case “$host” in
alpha*--linux)
if test x$ac_cv_prog_gcc = xyes; then
CFLAGS=“$CFLAGS -mcpu=ev4 -Wa,-mall”
@@ -208,7 +212,7 @@
CheckNASM()
{
dnl Make sure we are running on an x86 platform
- case “$host” in
i?86*)
;;
*)
@@ -542,7 +546,7 @@
[ --enable-pthread-sem use pthread semaphores [default=yes]],
, enable_pthread_sem=yes)
ac_save_libs=“$LIBS”
- case “$host” in
--freebsd*)
pthread_cflags=“-D_REENTRANT -D_THREAD_SAFE”
pthread_lib=“-pthread”
@@ -616,7 +620,7 @@
See if we can use clone() on Linux directly
use_clone=no
if test x$enable_threads = xyes -a x$use_pthreads != xyes; then
@@ -718,7 +722,7 @@
SYSTEM_LIBS=“$SYSTEM_LIBS -lkstat”
}
-case “$target” in
+case “$host” in
--linux*)
ARCH=linux
CheckESD
@@ -1016,7 +1020,8 @@
;;
--cygwin* | --mingw32*)
ARCH=win32