Cross compiling from linux to win32 using mingw32

I set everything up like it says at
http://www.libsdl.org/extras/win32/cross/README.txt and I can compile
without any warnings or errors, but when I try and run the program the call
to SDL_SetVideoMode() returns NULL, and SDL_GetError() returns the
following:
DirectDrawSurface::Release: Unknown DirectDraw error: 0x1
I’ve tried running the program in win98 SE, as well as in WineX, and the
error is the same in both, which makes me think it’s either a problem with
SDL, or with the way mingw32 is compiling the DirectX stuff (old headers or
something? Using the ones from the URL above). The windows system has DX
8.0 I believe.—
Kyle Murphy

Hi there,

i used the same documentation to set here everything up for
crosscompiling and it is working here fine. So i would say maybe your
make or configure script is doing something wrong. Just a path set wrong
would be enough… and make sure that in the path variable the path to
your crosscompiling tools comes first and then the normal path.

If it is not working i can even give you the scripts i use to compile my
programm.

bye bye
Steffen–

Steffen Pohle (@Steffen_Pohle)| _ x
http://stpohle.bei.t-online.de | /#/ BomberClone - The Clone of
JabberID: stpohle at amessage.de ||###| DynaBlaster and Bomberman
ICQ: 370965 Yahoo: stpohle | #/ http://www.bomberclone.de
MSN: stpohle at hotmail.com |

Well, I’ve double and triple checked all the compile flags and paths and it
all seems to be correct as far as I can tell, and the program does compile
without so much as a warning. I’ve also compiled and ran a number of win32
api and directx programs and they run fine, it’s only SDL thats giving me
problems. If you can send me your compile script I’ll look it over and see if
I’m missing anything, but I’m thinking maybe I’m missing a DLL or maybe need
a #define somewhere.—
Thanks, Kyle Murphy

Hi there,

i put the script to this mail maybe it helps you. If not try using the
newest SDL version. And the newest SDL Librarys. If this won’t help i
can put the cross-tools i use somewhere for a fast download.

bye bye
Steffen–

Steffen Pohle (@Steffen_Pohle)| _ x
http://stpohle.bei.t-online.de | /#/ BomberClone - The Clone of
JabberID: stpohle at amessage.de ||###| DynaBlaster and Bomberman
ICQ: 370965 Yahoo: stpohle | #/ http://www.bomberclone.de
MSN: stpohle at hotmail.com |

-------------- next part --------------
A non-text attachment was scrubbed…
Name: cross-configure.sh
Type: text/x-sh
Size: 265 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20031207/1a9b3514/attachment.sh
-------------- next part --------------
A non-text attachment was scrubbed…
Name: cross-make.sh
Type: text/x-sh
Size: 135 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20031207/1a9b3514/attachment-0001.sh
-------------- next part --------------
A non-text attachment was scrubbed…
Name: cross-cpp.sh
Type: text/x-sh
Size: 157 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20031207/1a9b3514/attachment-0002.sh
-------------- next part --------------
A non-text attachment was scrubbed…
Name: cross-strip.sh
Type: text/x-sh
Size: 136 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20031207/1a9b3514/attachment-0003.sh

Those are the same exact scripts I’m currently useing, and I have the latest
version of SDL as well. I’m pretty sure the problem is either with some of
the settings in my configure.ac file, or something in the DX library (I know
the windows version of SDL is supposed to use DX, but is that included with
SDL, or did it link against the version I had installed with the cross-tools
stuff? And is there a way to force SDL to not use DX?). The configure.ac I’m
useing is basicly the same exact one as I use to compile in linux, just with
-mwindows added to the CFLAGS, and I also tried manually adding a couple
librarys and things to see if that would fix some problems, but that dosn’t
seem to make any difference. Maybe you could send me a small program and the
configure.ac/Makefile.am that your able to get working in windows. If I can’t
get anywhere with that I’m afraid I’ll have to start mucking around in the
SDL_main code.—
Thanks,
Kyle Murphy

Hi all,

Hmmm strange, well i have a diffrent SDL Version on windows for testing
as for compiling and it is working very fine. With the diffrent Library
Versions. Does the problem only come up with your programm or with
other SDL games too? Ok to make sure it have nothing to do with your
configure script here is the part i use for my game.

I’ll start copying my cross-tool directory to somewhere as soon as i
have done this you will be able to download this and try this version.
Maybe something is wrong with your directory.

it will be at : http://bomberclone.sourceforge.net/devel/ somewhere
here you will find the file.

bye bye
Steffen

------------ configure.in (just a little part of it)
dnl Checks for typedefs, structures, and compiler characteristics.
case “$target” in
cygwin | mingw32 | mingw32msvc )
CFLAGS="$CFLAGS"
LIBS="$LIBS -liberty -lwsock32 -lm"
;;
solaris )
CFLAGS="$CFLAGS"
LIBS="$LIBS -lsocket -lnsl -lm"
AC_PATH_X
AC_PATH_XTRA
if test x$have_x = xyes; then
CFLAGS="$CFLAGS $X_CFLAGS"
SYS_GL_LIBS="$X_LIBS -lGL -lGLU"
else
SYS_GL_LIBS="-lGL -lGLU"
fi
;;
*)
AC_PATH_X
AC_PATH_XTRA
if test x$have_x = xyes; then
CFLAGS="$CFLAGS $X_CFLAGS"
fi
;;
esac
CFLAGS="$CFLAGS -Wall"–

Steffen Pohle (@Steffen_Pohle)| _ x
http://stpohle.bei.t-online.de | /#/ BomberClone - The Clone of
JabberID: stpohle at amessage.de ||###| DynaBlaster and Bomberman
ICQ: 370965 Yahoo: stpohle | #/ http://www.bomberclone.de
MSN: stpohle at hotmail.com |