Can't static link on LGPL project [SOLVED]

Just for future people cruising the archives:

To compile win32 SDL programs statically under mingw32, msys, gcc/g++:

the fix for this is
(a) Changing the #DEFINE’s of DECLSPEC from __declspec etc etc to nothing
(ie. #DEFINE DECLSPEC (and nothing more on the same line)) in
begin_code.h - this is the only place where DECLSPEC is defined in SDL code.
(b) Compiling SDL with --enabled-shared=no specified. Not necessary, but
less of a waste of time.
© Compile your program with “sdl-config --cflags --static-libs” (or the
equivalent command line arguments, which are “-lmingw32 -lSDLmain -lSDL
-mwindows”), -static, and “-lm -luser32 -lgdi32 -lwinmm -ldxguid” at the
end.
Works.
m@
p.s I might put together a webpage about this at some point to save webfolk
some time.