[SDL] SDL and IDEs in Windows

Peter Strempel zotan at web.de
Tue Nov 4 12:15:01 PST 2003


On Tue, 04 Nov 2003 20:22:27 +0100, Sebastian Beschke <s.beschke at gmx.de> 
wrote:

> Let me add that on my system (Dev-C++), it's important to write the 
> -lSDLmain before -lSDL, or I get the exact same error that you describe. 
> So, try that.
>
> Does anyone on this list know the cause for this behaviour?

I assume the topic is MinGW, therefor GCC.

 From gcc info (about -l option):
      It makes a difference where in the command you write this option;
      the linker searches and processes libraries and object files in
      the order they are specified.  Thus, `foo.o -lz bar.o' searches
      library `z' after file `foo.o' but before `bar.o'.  If `bar.o'
      refers to functions in `z', those functions may not be loaded.

I do not know in detail, which functions from SDL refer to SDLmain or vice 
versa. But basically the cause for the behaviour is just how GCC handles 
object files. As far as I know, with MSVC for example the order makes no 
difference.

  Peter




More information about the SDL mailing list