# CanA't link my project against SDL

**URL:** <https://discourse.libsdl.org/t/canat-link-my-project-against-sdl/13907>\
**Category:** SDL Development\
**Created:** [October 3, 2006, 12:43pm UTC](https://discourse.libsdl.org/t/canat-link-my-project-against-sdl/13907 "2006-10-03T12:43:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Olsen](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/d/cab0a1/32.png) [@David\_Olsen](https://discourse.libsdl.org/u/David_Olsen)\
**Post date:** [October 3, 2006, 12:43pm UTC](https://discourse.libsdl.org/t/canat-link-my-project-against-sdl/13907/1 "2006-10-03T12:43:17Z")

</div>

> > Hello Michael,
> > 
> > Tuesday, October 3, 2006, 11:07:48 AM, you wrote:
> > 
> > > Thanks, that worked 🙂  
> > > 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.)  
> -Dave
> 
> > –  
> > Best regards,  
> > Peter mailto:darkmatter at [freeuk.com](http://freeuk.com)
> > 
> > * * *
> > 
> > SDL mailing list  
> > SDL at [libsdl.org](http://libsdl.org)  
> > [http://www.libsdl.org/mailman/listinfo/sdl](http://www.libsdl.org/mailman/listinfo/sdl)
> 
> > ----- Original Message -----  
> > From: [darkmatter@freeuk.com](mailto:darkmatter@freeuk.com) (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
