VS2017 project upgrade error LNK2005: "public: __thiscall ATL :: CTime ::

I will upgrade the project to upgrade VS2017 from VS2012, being given as follows

1> atlsd.lib (atltime.obj): error LNK2005: "public: __thiscall ATL :: CTime :: CTime (__ int64)" (?? 0CTime @ ATL @@ QAE @ _J @ Z) already defined in the UNIServer.obj
1> atlsd.lib (atltime.obj): error LNK2005: "public: int __thiscall ATL :: CTime :: GetHour (void) const" (? GetHour @ CTime @ ATL @@ QBEHXZ) has been defined in UNIServer.obj in
1 > atlsd.lib (atltime.obj): error LNK2005 : "public: struct tm * __thiscall ATL :: CTime :: GetLocalTm (struct tm *) const" (GetLocalTm @ CTime @ ATL @@ QBEPAUtm @@ PAU3 @@ Z? ) has been defined in UNIServer.obj in
1> atlsd.lib (atltime.obj): error LNK2005: "public: int __thiscall ATL :: CTime :: GetMinute (void) const" (GetMinute @ CTime @ ATL @@ QBEHXZ)? has been defined in the UNIServer.obj
1> atlsd.lib (atltime.obj): error LNK2005: "public: static class ATL :: CTime __stdcall ATL :: CTime :: GetTickCount (void)"(? GetTickCount @ CTime @ ATL @@ SG? AV12 @ XZ) already defined in the UNIServer.obj

the reason:

  My problem with the installed VS2017, can not find this atlsd, lib file in the installation package, then no way directly linked files in VS2012

Solution:

  Project -> Properties -> Linker -> Command Line: Add / FORCE: MULTIPLE, recompile, will be solved

Guess you like

Origin www.cnblogs.com/hul201610101100/p/11261646.html