Friday, May 06, 2005

What is ERROR LNK2005?

Hi, I am trying to compile an open-source project named Vovida. It compiles cleanly, but when I get to linking, it gives me this:

Linking...
libcpmt.lib(xlock.obj) : error LNK2005: "public: __thiscall std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QAE@XZ) already defined in sdp2.lib(Sdp2Session.obj)obj.nodebug.Win32.i686/ua.exe : fatal error LNK1169: one or more multiply defined symbols foundError
executing link.exe.

I have searched the google and got the answer - the project setting in "sdp2" is different from the one in "ua", one is single-threaded, the other one is multithreaded. When I change the "sdp2" project to use the multithreaded run-time library, the compilation is successful.

0 Comments:

Post a Comment

<< Home