VC++ error

This is a discussion on VC++ error within the Windows Programming forums, part of the Platform Specific Boards category; I get this error when compiling something in VC++6
LIBCMT.lib(osfinfo.obj) : error LNK2005: __alloc_osfhnd already defined in LIBCD.lib(osfinfo.obj)
LIBCMT.lib(osfinfo.obj) : ...

For some reason you appear to be linking to the multi-threaded CRT library, and the debug single-threaded CRT library. You can only link to one CRT library per project. You either have a #pragma statement telling your compiler to link to a CRT, or you added a CRT .lib file to the project link options. In either case, this is the wrong way to select which CRT to use for your project. The correct way is to go to project settings, then click on the "C/C++" tab. From there select "code generation" from the category drop-down box, then select the CRT you want from the "Use run-time library" drop down.