Sign in to follow this  
ricekrispyw

Wierd errors that never happened before...

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
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
Ahh, thanks. I really should have just looked at the help, instead of bothering you people. It's been a long day.

I appreciate the help. rating++

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this