User forums > Using Code::Blocks

VC 2008 and SDL

(1/1)

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


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

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:
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:

--- Quote ---defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library.
--- End quote ---
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.

Navigation

[0] Message Index

Go to full version