# Already Defined Errors in Visual Studio 2003

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

## 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 on other sites
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 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 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 :-)

1. 1
2. 2
3. 3
Rutin
19
4. 4
5. 5

• 10
• 21
• 9
• 31
• 16
• ### Forum Statistics

• Total Topics
632618
• Total Posts
3007464
• ### Who's Online (See full list)

There are no registered users currently online

×