Article - CS217302
Error LNK2005 appears when building a solution containing 2 Creo Parametric Object TOOLKIT C++ projects.
Modified: 06-Sep-2015
Applies To
- Creo Parametric 3.0 M030
Description
- Error LNK2005 appears when building a solution containing 2 Creo Parametric Object TOOLKIT C++ projects.
- Sample error message:
2>Server.lib(Server.dll) : error LNK2005: "public: __cdecl xstring::xstring(class xstring const &)" (??0xstring@@QEAA@AEBV0@@Z) already defined in otk_cpp_md.lib(strlibsrc.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: __cdecl xstring::~xstring(void)" (??1xstring@@QEAA@XZ) already defined in otk_cpp_md.lib(strlibsrc.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: struct __xstring_c __cdecl xstring::getxstring_c(void)const " (?getxstring_c@xstring@@QEBA?AU__xstring_c@@XZ) already defined in otk_cpp_md.lib(strlibsrc.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: __cdecl xstring::xstring(void)" (??0xstring@@QEAA@XZ) already defined in otk_cpp_md.lib(strlibsrc.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: __cdecl xstring::xstring(char const *)" (??0xstring@@QEAA@PEBD@Z) already defined in otk_cpp_md.lib(strlibsrc.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: class xstring & __cdecl xstring::operator=(char const *)" (??4xstring@@QEAAAEAV0@PEBD@Z) already defined in otk_cpp_md.lib(strlibsrc.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: class xstring & __cdecl xstring::operator=(class xstring const &)" (??4xstring@@QEAAAEAV0@AEBV0@@Z) already defined in otk_cpp_md.lib(strlibsrc.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: class xstring & __cdecl xstring::operator+=(char const *)" (??Yxstring@@QEAAAEAV0@PEBD@Z) already defined in otk_cpp_md.lib(strlibsrc.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: class xstring & __cdecl xstring::operator+=(class xstring const &)" (??Yxstring@@QEAAAEAV0@AEBV0@@Z) already defined in otk_cpp_md.lib(services.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: static class xstring __cdecl xstring::Printf(char const *,...)" (?Printf@xstring@@SA?AV1@PEBDZZ) already defined in otk_cpp_md.lib(strlibsrc.obj)
2>Server.lib(Server.dll) : error LNK2005: "private: char const * __cdecl xstring::CastToCString(void)const " (?CastToCString@xstring@@AEBAPEBDXZ) already defined in otk_cpp_md.lib(strlibsrc.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: __cdecl xstring::xstring(wchar_t const *)" (??0xstring@@QEAA@PEB_W@Z) already defined in otk_cpp_md.lib(strlibsrc.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: __cdecl xstring::operator char const *(void)const " (??Bxstring@@QEBAPEBDXZ) already defined in otk_cpp_md.lib(services.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: bool __cdecl xstring::IsEmpty(void)const " (?IsEmpty@xstring@@QEBA_NXZ) already defined in otk_cpp_md.lib(services.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: int __cdecl xstring::GetLength(void)const " (?GetLength@xstring@@QEBAHXZ) already defined in otk_cpp_md.lib(strlibsrc.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: class xstring __cdecl xstring::Substring(int,int)const " (?Substring@xstring@@QEBA?AV1@HH@Z) already defined in otk_cpp_md.lib(strlibsrc.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: int __cdecl xstring::Pos(char const *)const " (?Pos@xstring@@QEBAHPEBD@Z) already defined in otk_cpp_md.lib(strlibsrc.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: bool __cdecl xstring::Match(class xstring const &)const " (?Match@xstring@@QEBA_NAEBV1@@Z) already defined in otk_cpp_md.lib(services.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: __cdecl xstring::xstring(char const *,char const *)" (??0xstring@@QEAA@PEBD0@Z) already defined in otk_cpp_md.lib(strlibsrc.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: bool __cdecl xstring::ToInt(int *)const " (?ToInt@xstring@@QEBA_NPEAH@Z) already defined in otk_cpp_md.lib(strlibsrc.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: class xstring __cdecl xstring::ToLower(void)const " (?ToLower@xstring@@QEBA?AV1@XZ) already defined in otk_cpp_md.lib(strlibsrc.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: bool __cdecl xstring::Match(char const *)const " (?Match@xstring@@QEBA_NPEBD@Z) already defined in otk_cpp_md.lib(strlibsrc.obj)
2>Server.lib(Server.dll) : error LNK2005: "private: wchar_t const * __cdecl xstring::CastToCWString(void)const " (?CastToCWString@xstring@@AEBAPEB_WXZ) already defined in otk_cpp_md.lib(strlibsrc.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: __cdecl xstring::xstring(char const *,int)" (??0xstring@@QEAA@PEBDH@Z) already defined in otk_cpp_md.lib(strlibsrc.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: class xstring & __cdecl xstring::operator+=(char)" (??Yxstring@@QEAAAEAV0@D@Z) already defined in otk_cpp_md.lib(strlibsrc.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: __cdecl xstring::~xstring(void)" (??1xstring@@QEAA@XZ) already defined in otk_cpp_md.lib(strlibsrc.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: struct __xstring_c __cdecl xstring::getxstring_c(void)const " (?getxstring_c@xstring@@QEBA?AU__xstring_c@@XZ) already defined in otk_cpp_md.lib(strlibsrc.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: __cdecl xstring::xstring(void)" (??0xstring@@QEAA@XZ) already defined in otk_cpp_md.lib(strlibsrc.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: __cdecl xstring::xstring(char const *)" (??0xstring@@QEAA@PEBD@Z) already defined in otk_cpp_md.lib(strlibsrc.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: class xstring & __cdecl xstring::operator=(char const *)" (??4xstring@@QEAAAEAV0@PEBD@Z) already defined in otk_cpp_md.lib(strlibsrc.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: class xstring & __cdecl xstring::operator=(class xstring const &)" (??4xstring@@QEAAAEAV0@AEBV0@@Z) already defined in otk_cpp_md.lib(strlibsrc.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: class xstring & __cdecl xstring::operator+=(char const *)" (??Yxstring@@QEAAAEAV0@PEBD@Z) already defined in otk_cpp_md.lib(strlibsrc.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: class xstring & __cdecl xstring::operator+=(class xstring const &)" (??Yxstring@@QEAAAEAV0@AEBV0@@Z) already defined in otk_cpp_md.lib(services.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: static class xstring __cdecl xstring::Printf(char const *,...)" (?Printf@xstring@@SA?AV1@PEBDZZ) already defined in otk_cpp_md.lib(strlibsrc.obj)
2>Server.lib(Server.dll) : error LNK2005: "private: char const * __cdecl xstring::CastToCString(void)const " (?CastToCString@xstring@@AEBAPEBDXZ) already defined in otk_cpp_md.lib(strlibsrc.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: __cdecl xstring::xstring(wchar_t const *)" (??0xstring@@QEAA@PEB_W@Z) already defined in otk_cpp_md.lib(strlibsrc.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: __cdecl xstring::operator char const *(void)const " (??Bxstring@@QEBAPEBDXZ) already defined in otk_cpp_md.lib(services.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: bool __cdecl xstring::IsEmpty(void)const " (?IsEmpty@xstring@@QEBA_NXZ) already defined in otk_cpp_md.lib(services.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: int __cdecl xstring::GetLength(void)const " (?GetLength@xstring@@QEBAHXZ) already defined in otk_cpp_md.lib(strlibsrc.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: class xstring __cdecl xstring::Substring(int,int)const " (?Substring@xstring@@QEBA?AV1@HH@Z) already defined in otk_cpp_md.lib(strlibsrc.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: int __cdecl xstring::Pos(char const *)const " (?Pos@xstring@@QEBAHPEBD@Z) already defined in otk_cpp_md.lib(strlibsrc.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: bool __cdecl xstring::Match(class xstring const &)const " (?Match@xstring@@QEBA_NAEBV1@@Z) already defined in otk_cpp_md.lib(services.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: __cdecl xstring::xstring(char const *,char const *)" (??0xstring@@QEAA@PEBD0@Z) already defined in otk_cpp_md.lib(strlibsrc.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: bool __cdecl xstring::ToInt(int *)const " (?ToInt@xstring@@QEBA_NPEAH@Z) already defined in otk_cpp_md.lib(strlibsrc.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: class xstring __cdecl xstring::ToLower(void)const " (?ToLower@xstring@@QEBA?AV1@XZ) already defined in otk_cpp_md.lib(strlibsrc.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: bool __cdecl xstring::Match(char const *)const " (?Match@xstring@@QEBA_NPEBD@Z) already defined in otk_cpp_md.lib(strlibsrc.obj)
2>Server.lib(Server.dll) : error LNK2005: "private: wchar_t const * __cdecl xstring::CastToCWString(void)const " (?CastToCWString@xstring@@AEBAPEB_WXZ) already defined in otk_cpp_md.lib(strlibsrc.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: __cdecl xstring::xstring(char const *,int)" (??0xstring@@QEAA@PEBDH@Z) already defined in otk_cpp_md.lib(strlibsrc.obj)
2>Server.lib(Server.dll) : error LNK2005: "public: class xstring & __cdecl xstring::operator+=(char)" (??Yxstring@@QEAAAEAV0@D@Z) already defined in otk_cpp_md.lib(strlibsrc.obj)
This is a printer-friendly version of Article 217302 and may be out of date. For the latest version click CS217302