Public Group

# how do I deal with libraries conflicting with other libraries?

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

## Recommended Posts

I tried making my own simple test lib and it comlies fine. but when I try to use it I get a bunch of linker errors. I believe it has to do with libraries conflcting with other libs. for example
MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)
MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library

why is this happening and how do i fix it? [Edited by - Run_The_Shadows on March 28, 2006 10:17:05 PM]

##### Share on other sites

Basically what's happening is you're trying to use libraries intended for either Debug/Release or Single-Threaded/Multi-Threaded for a build which does not meet that criteria (i.e. using Debug libraries for a Release build). That link should tell you which ones you'll need to ignore or not ignore. If that doesn't help, I'll explain some more...

Edit: ack, link copied wrong; try now.

##### Share on other sites
thanks that helped me alot!!

prettymuch I ignored every lib that was causing a linker error. That allowed it to compile and it runs ok but will that always be the case if I just ignore every "squeaky" lib?

##### Share on other sites
Quote:
 Original post by donjonsonprettymuch I ignored every lib that was causing a linker error. That allowed it to compile and it runs ok but will that always be the case if I just ignore every "squeaky" lib?
You should ignore the library if you know you don't need it for a particular build. That link I provided tells you all the libraries which can be ignored, and I would suggest ignoring all the ones you don't need because... you don't need them... heh, plus it reduces the size of the executable.

• 33
• 15
• 23
• 10
• 19