CanA't link my project against SDL

Hello Michael,

Tuesday, October 3, 2006, 11:07:48 AM, you wrote:

Thanks, that worked :slight_smile:
Now I get a warning that msvcrtd.lib conflicts with other libraries and
I should use /nodefault, do you know why this happens?

It happens because MSVC 2005 uses a different runtime library to what
SDLmain.lib is compiled for.

You can get around this in one of two ways:

  1. recompile SDL in MSVC 2005 so you get a compatible SDLmain.lib
  2. Add src/main/win32/SDL_win32_main.c to your project.

I also use MSVC 2005 and I’ve never had to recompile SDL, or add
src/main/etc. to any of my projects to avoid this error/warning. I
occasionally get such an error if I try to include certain other libraries
(e.g. boost, or zziplib come to mind). Check on which other .lib’s you are
linking with.
(and check that you are compiling as “Multi-Threaded debug dll” in C/C++
compiler options.)

Best regards,
Peter mailto:darkmatter at

SDL mailing list
SDL at

----- Original Message -----
From: (Peter Mulholland)
To: "A list for developers using the SDL library. (includes SDL-announce)"
Sent: Tuesday, October 03, 2006 5:18 AM
Subject: Re: [SDL] Can??t link my project against SDL