Jump to content
  • Advertisement
Sign in to follow this  
ilflyer12

Already Defined Errors in Visual Studio 2003

This topic is 4176 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

Alright everyone, i am trying to finish up a program that needs to do major matrix operations. However, currently when i include the clapack.lib, i get the following errors:
leafPRT error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCD.lib(typinfo.obj)
leafPRT error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCD.lib(typinfo.obj)
leafPRT error LNK2005: _exit already defined in LIBCD.lib(crt0dat.obj)
leafPRT error LNK2005: _fprintf already defined in LIBCD.lib(fprintf.obj)
leafPRT error LNK2005: _malloc already defined in LIBCD.lib(dbgheap.obj)
leafPRT error LNK2005: _free already defined in LIBCD.lib(dbgheap.obj)
I know they are called by the clapack.lib because if i remove the lapack code and remove the library file, the program runs fine with no errors. Does anyone know how to get rid of these errors? I have made sure that when i compile the clapack library from the source that it is done with Single-threaded debugging just like my actual project. I appreciate all the help.

Share this post


Link to post
Share on other sites
Advertisement
Do you use UNICODE (or multibyte characters) in both projects as well? Because if one is compiled as UNICODE when the other is compiled as multibyte-character then you'll get the same linker errors IIRC.

P.S. No, forget it, that's nonsense. Little brainfart here. :o

Share this post


Link to post
Share on other sites
Most likely, you're building clapack.lib with one runtime (Multithreaded DLL, Debug Singlethreaded, etc.), and your host app with another.

EDIT: Hmm, nevermind.

Share this post


Link to post
Share on other sites
Ok, so all of my builds were Unicode but since the solution had about 25 projects in it, when i changed the one that I was using to Single Threaded Debug, i had not changed the rest. After going through each one and changing all of them to Single Threaded Debug, I no longer get the already defined error. Thanks everyone for your help since you did help me solve it even if it wasnt on purpose :-)

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!