• Advertisement
Sign in to follow this  

Wierd errors that never happened before...

This topic is 4690 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm getting these strange (to me) errors whenever I try to compile anything (even, oddly enough, stuff that used to work)
LIBCMT.lib(osfinfo.obj) : error LNK2005: __alloc_osfhnd already defined in LIBCD.lib(osfinfo.obj)
LIBCMT.lib(osfinfo.obj) : error LNK2005: __set_osfhnd already defined in LIBCD.lib(osfinfo.obj)
LIBCMT.lib(osfinfo.obj) : error LNK2005: __free_osfhnd already defined in LIBCD.lib(osfinfo.obj)
LIBCMT.lib(osfinfo.obj) : error LNK2005: __get_osfhandle already defined in LIBCD.lib(osfinfo.obj)
LIBCMT.lib(osfinfo.obj) : error LNK2005: __open_osfhandle already defined in LIBCD.lib(osfinfo.obj)
LIBCMT.lib(dosmap.obj) : error LNK2005: __dosmaperr already defined in LIBCD.lib(dosmap.obj)
LINK : warning LNK4098: defaultlib "LIBCMT" conflicts with use of other libs; use /NODEFAULTLIB:library
Debug/ss.exe : fatal error LNK1169: one or more multiply defined symbols found



I have installed STLPort, but it doesn't look like that's the problem. I'm running VC++6 under WinXP. Thanks in advance. [EDIT] Actually, it seems to be only console apps. [EDIT2] I've narrowed it down. iostream is the problem.

Share this post


Link to post
Share on other sites
Advertisement
Those errors sound like the "ignore default .lib problem".

libcd.lib would be the single-threaded debug version of the c runtime libraries.

libcmt.lib would be the multi-thread release version.

Clearly, those are not meant to co-exist in the same app [smile]

There should be a setting in your project's properties that allows you to configure which runtime libraries to ignore, so that there are no name clashes.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement