[SDL] Correct way of including SDL?

Bill Kendrick nbs at sonic.net
Mon Sep 3 19:37:28 PDT 2007


On Mon, Sep 03, 2007 at 08:41:24PM -0400, L-28C wrote:
> Hello everyone!
> 
> OK, I've heard the correct way of using SDL is this:
> #include <SDL.h>
> and passing `sdl-config --cflags` to the compiler, but there's no such 
> file sdl-config in Windows... :/

No.  You #include "SDL.h".  And if 'sdl-config' is unavailable, or unusable
in your build environment, just make sure that you add the path to the SDL
headers to your build system's header path.  (e.g., with GCC you'd
do an "-I" to add an additional include path)

That's the most portable way.

-bill!


More information about the SDL mailing list