Mingw32 - SDL 0.10.0

Hi.

I just got the new stable SDL, and tried to compile my program, which used
to work fine.
I reinstalled mingw32 (well, deleted/unzipped it), and installed the SDL
library and header files. When I tried to compile the program, (i did
include SDL (ie -lSDL), The linker gave the error msg
(condensed)

libmingw32.a (main.o) undefined referance to WinMain at 16

Perhaps others have had this problem? or perhaps its not an SDL problem?
If this isn’t relevant to this list, please tell me.

Other programs, including the test/example programs gave the same error.

The command i used to compile is g++ start.cpp -o start.exe -lSDL

Anyone got any idea of what the problem is? Would love to hear from you.

@Timothy_Downs
Timothy Downs.*************************************
One ring to rule them all - Ring Zero


Get Your Private, Free Email at http://www.hotmail.com

Perhaps others have had this problem? or perhaps its not an SDL problem?
If this isn’t relevant to this list, please tell me.

Other programs, including the test/example programs gave the same error.

The command i used to compile is g++ start.cpp -o start.exe -lSDL

Compile the programs in the test directory and look at the link line.
The actual link line should look like the output of sdl-config --libs,
the version of the script installed in /usr/local/cross-tools/i386-mingw32/bin/

-Sam Lantinga				(slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec

Thanks for all the help regarding the problem with linking programs using
SDL 1.0, compiling in windows using mingw32 (1.1.1 i beleive).

However :(, when I compile with -mdll, and run the executable, it does
nothing, that is, exits immediately. This also happens with any program when
I use -mdll.

Additionally, when i had a look at sdl-config --libs, it wants the dxguid
library, which I dont have, and cannot find.

Anyone actually successfully compiled programs in Windows using mingw32, and
SDL 1.0 ?

The Linux version compiles fine, on the same program BTW.

@Timothy_Downs
Timothy Downs--------------------------------------------------------------
One ring to rule them all - Ring Zero


Get Your Private, Free Email at http://www.hotmail.com

Thanks for all the help regarding the problem with linking programs using
SDL 1.0, compiling in windows using mingw32 (1.1.1 i beleive).

However :(, when I compile with -mdll, and run the executable, it does
nothing, that is, exits immediately. This also happens with any program when
I use -mdll.

Additionally, when i had a look at sdl-config --libs, it wants the dxguid
library, which I dont have, and cannot find.

Anyone actually successfully compiled programs in Windows using mingw32, and
SDL 1.0 ?

Has anyone read README.Win32?—
I. Building the Simple DirectMedia Layer libraries:
(This step isn’t necessary if you have the SDL binary distribution)

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):
PATH=/usr/local/cross-tools/i386-mingw32/bin:$PATH
and then:
./configure --host=i386-linux --target=mingw32 ; make; make install

If everything compiles successfully, you now have the EGCS archive libraries
libSDLmain.a, libSDL.a and possibly the windows dynamic link libraries.


If you don’t use the DirectX cross-compile libraries on the Xmingw32
web page, you’ll have to add --disable-directx command line option to
configure.

-Sam Lantinga				(slouken at devolution.com)

Lead Programmer, Loki Entertainment Software

“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec

Why should we? That’s why we have the list!

:)On Thu, 16 Dec 1999, Sam Lantinga wrote:

Has anyone read README.Win32?