News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

VC 2008 and SDL

Started by jhp, January 11, 2008, 01:56:32 PM

Previous topic - Next topic

jhp

Hi Everyone!

I've just received a laptop with Vista on it and decided to transfer my C++ learning over to it. As I read that there are problems with MinGW and Vista, I thought I'd put VC 2008 on there and set CodeBlocks up as my IDE.

After reading through the forums I can't find much on VC 2008, and am wondering if I'm wasting my time installing this thing? Although I've had some console apps compiling fine, whenever I try to use SDL I'm getting some odd errors, like

defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library.

Using NODEFAULTLIB doesn't help either, it just throws up more errors.

Previously I used MinGW and all worked OK, does anyone know what I should do to get SDL up and running with VC 2008 or should I just save myself the hassle?  :)

TIA

jhp

Mc.Michael

#1
Try add to linker options:


/NODEFAULTLIB:msvcrt.lib

And compile your project with static C/C++ runtime ( /MT or /MTd )

jhp

Bah, still errors galore :?

Think I'll go back to MinGW for now and see how I get on.

Thanks for the response!

Albenejean

Quotedefaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library.
This should be just a warning and not en error.

However, I don't think that you have to explicitly link the msvcrt, msvcprtd.lib, orothers, if the flags /MT, /MTd, /MD, MDd are active. Please verify this. Personnly, I don't give any of these files to the linker. I just use the flags.