SDL newbie

Hi,
it was just 2 days ago that I came across SDL, and it’s looking promising.
So I would like to try out SDL with mingw32 under Windows. More precisely,
that is, I want to use it with the version of mingw32 that comes with the
DevC++ 4.0 environment. However, I wasn’t able to compile even the
testprogram “testsprite.c”.

What I did was this: I downloaded “Devel-Runtime-Mingw32.tar.gz” Version
1.1.8, extracted the files and copied the SDL include directory and the lib
files to the appropriate places in DevC++. Compilation of the test-proggie
runs fine, but the linker says: “unresolved function WinMain16@”.

I’m not doing right, do I?
Does anyone use SDL together with DevC++?

The version of gcc that is used by DevC++ is this:

gcc -v
using builtin specs
gcc version 2.95.2 19991024 (release)

with greetings,
chris

“Christian Sch?ler” wrote

What I did was this: I downloaded “Devel-Runtime-Mingw32.tar.gz” Version
1.1.8, extracted the files and copied the SDL include directory and the lib
files to the appropriate places in DevC++. Compilation of the test-proggie
runs fine, but the linker says: “unresolved function WinMain16@”.

I’m not doing right, do I?
Does anyone use SDL together with DevC++?

i haven’t used your compiler setup, but my first guess is that
you are not linking to the SDLmain library. SDLmain helps handle
the cross-platform program entry points, and includes a basic
WinMain function to get things going (which then calls your
own “main” function)