Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
6712 Discussions

Link Error VS2008 - xxxxx already defined in libcpmt.lib

photo_tom
Beginner
1,213 Views
I have a project that has been working fine with IPP and I've just added a call to ippiResizeSqrPixel_8u_C4R. Now I'm getting the follwoing link errors -

1>libcpmt.lib(locale0.obj) : error LNK2005: "public: static unsigned int __cdecl std::char_traits::length(char const *)" (?length@?$char_traits@D@std@@SAIPBD@Z) already defined in msvcprtd.lib(MSVCP90D.dll)
1>libcpmt.lib(locale0.obj) : error LNK2005: "public: unsigned int __thiscall std::basic_string,class std::allocator >::size(void)const " (?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ) already defined in msvcprtd.lib(MSVCP90D.dll)
1>libcpmt.lib(locale0.obj) : error LNK2005: "protected: char * __thiscall std::basic_string,class std::allocator >::_Myptr(void)" (?_Myptr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEPADXZ) already defined in msvcprtd.lib(MSVCP90D.dll)
1>libcpmt.lib(locale0.obj) : error LNK2005: "public: char const * __thiscall std::basic_string,class std::allocator >::c_str(void)const " (?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ) already defined in msvcprtd.lib(MSVCP90D.dll)
1>libcpmt.lib(locale0.obj) : error LNK2005: "public: class std::basic_string,class std::allocator > & __thiscall std::basic_string,class std::allocator >::erase(unsigned int,unsigned int)" (?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@II@Z) already defined in msvcprtd.lib(MSVCP90D.dll)
1>libcpmt.lib(locale0.obj) : error LNK2005: "public: __thiscall std::basic_string,class std::allocator >::~basic_string,class std::allocator >(void)" (??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) already defined in msvcprtd.lib(MSVCP90D.dll)
1>libcpmt.lib(locale0.obj) : error LNK2005: "public: __thiscall std::basic_string,class std::allocator >::basic_string,class std::allocator >(char const *)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z) already defined in msvcprtd.lib(MSVCP90D.dll)
1>libcpmt.lib(locale0.obj) : error LNK2005: "public: class std::basic_string,class std::allocator > & __thiscall std::basic_string,class std::allocator >::operator=(char const *)" (??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z) already defined in msvcprtd.lib(MSVCP90D.dll)
.....continues with more of same

My configuration is
Visual Studio 2008SP1. Current version IPP. All modules compiled with /MDd setting. I'm am linking to IPP using static linking with dispatch configuration.

Ipp libraries included -

  • ippsemerged.lib
  • ippsmerged_t.lib
  • ippiemerged.lib
  • ippimerged_t.lib
  • ippcore_t.lib
  • libiomp5mt.lib
  • libircmt.lib

Suggestions as to what I need to do.

0 Kudos
1 Solution
thom_sdae
Novice
1,213 Views
have you tried to exclude "msvcprtd.lib" from linking ?

regards, thom

View solution in original post

0 Kudos
3 Replies
mecej4
Honored Contributor III
1,213 Views
Have you tried cleaning and rebuilding? It appears that one or more C++ files were compiled with /MT rather than /MDd .
0 Kudos
photo_tom
Beginner
1,213 Views
Yes. I had considered that and checked all my projects.
0 Kudos
thom_sdae
Novice
1,214 Views
have you tried to exclude "msvcprtd.lib" from linking ?

regards, thom
0 Kudos
Reply