New linking problem

Well, that problem was fixed, and now I’m stuck with a new one, on the
attached code.

I get these:

C:\DOCUME~1\sjss\LOCALS~1\Temp\cccDdaaa.o(.text+0xa8):input.cpp: undefined
reference to SDL_EnableKeyRepeat' C:\DOCUME~1\sjss\LOCALS~1\Temp\cccDdaaa.o(.text+0xb7):input.cpp: undefined reference toSDL_EventState’
C:\DOCUME~1\sjss\LOCALS~1\Temp\cccDdaaa.o(.text+0xc6):input.cpp: undefined
reference to SDL_EventState' C:\DOCUME~1\sjss\LOCALS~1\Temp\cccDdaaa.o(.text+0xd5):input.cpp: undefined reference toSDL_EventState’
C:\DOCUME~1\sjss\LOCALS~1\Temp\cccDdaaa.o(.text+0xe4):input.cpp: undefined
reference to SDL_EventState' C:\DOCUME~1\sjss\LOCALS~1\Temp\cccDdaaa.o(.text+0xf3):input.cpp: undefined reference toSDL_EventState’
C:\DOCUME~1\sjss\LOCALS~1\Temp\cccDdaaa.o(.text+0x103):input.cpp: undefined
reference to SDL_SetEventFilter' C:\DOCUME~1\sjss\LOCALS~1\Temp\cccDdaaa.o(.text+0x12f):input.cpp: undefined reference toSDL_WaitEvent’

my command line was the following
gcc -lmingw32 -lSDLmain -lSDL -mwindows input.cpp

This is what ‘sdl-config --libs’ outputted (minus the -L/usr/local/lib/
which was tried, but produced no effect- anyway, this is a windows system,
that directory doesn’t exist).

The precompiled, libSDL.a, libSDLmain.a, and SDL.dll that came
with the development version of SDL were all placed in the lib directory of
MinGW as well.

I’m sorry for so many posts, but I can seem to get this to work no matter
what I do…
-------------- next part --------------
A non-text attachment was scrubbed…
Name: input.cpp
Type: application/octet-stream
Size: 1686 bytes
Desc: not available

my command line was the following
gcc -lmingw32 -lSDLmain -lSDL -mwindows input.cpp

With gcc you need to order things on the command line in dependency order.
gcc -o input.exe input.cpp -lmingw32 -lSDLmain -lSDL -mwindows

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment