在使用Xerces-C 3.0时,我可以使用__stdcall约定吗?我收到链接器错误

Can I use __stdcall convention while using Xerces-C 3.0? I get linker errors

本文关键字:错误 链接 约定 stdcall 0时 Xerces-C 我可以 可以使      更新时间:2023-10-16

在我的项目中,使用__stdcall至关重要。然而,我得到了这个:

1> ExchangeParser.obj:错误LNK2001:未解析的外部符号"public:static void __cdecl xercesc_3_0::XMLString::release(无符号短**,类xercesc_3 _0::MemoryManager*const)"(?release@XMLString@xercesc_3_0@@SAXPEAPEAGQEAVMemoryManager@2@@Z)1> ExchangeParser.obj:错误LNK2001:未解析的外部符号"public:static char*__cdecl xercesc_3_0::XMLString::转码(无符号短常量*常量,类xercesc_3 _0::MemoryManager*常量)"(?transcode@XMLString@xercesc_3_0@@SAPEADQEBGQEAVMemoryManager@2@@Z)1> ExchangeParser.obj:错误LNK2001:未解析的外部符号"public:static unsigned short*__cdecl xercesc_3_0::XMLString::转码(char const*const,class xercesc_3 _0::MemoryManager*const)"(?transcode@XMLString@xercesc_3_0@@SAPEAGQEBDQEAVMemoryManager@2@@Z)1> ExchangeParser.obj:错误LNK2001:未解析的外部符号"public:static char const*const xercesc_3_0::XMLUni::fgXercescDefaultLocale"(?fgXercescDefaultLocale@XMLUni@xercesc_3_0@@2QBDB)1> ExchangeParser.obj:错误LNK2001:未解析的外部符号"public:static class xercesc_3_0::MemoryManager*xercesc_3 _0::XMLPlatformUtils::fgMemoryManager"(?fgMemoryManager@XMLPlatformUtils@xercesc_3_0@@2PEAVMemoryManager@2@EA)1> ExchangeParser.obj:错误LNK2001:未解析的外部符号"public:static class xercesc_3_0::DOMImplementation*__cdecl xercesc_3 _0::DOMIimplementationRegistry::getDOMImplementation(无符号短常量*)"(?getDOMImplementation@DOMImplementationRegistry@xercesc_3_0@@SAPEAVDOMImplementation@2@PEBG@Z)1> ExchangeParser.obj:错误LNK2001:未解析的外部符号"public:static unsigned short const*const xercesc_3_0::XMLUni::fgDOMWRFormatPrettyPrint"(?fgDOMWRTFormatPrettyPrint@XMLUni@xercesc_3_0@@2QBGB)1> ExchangeParser.obj:错误LNK2001:未解析的外部符号"public:static unsigned short const*const xercesc_3_0::XMLUni::fgDOMXML Declaration"(?fgDOMXMLDeclaration@XMLUni@xercesc_3_0@@2QBGB)

有什么帮助吗?

Xerces是开源的,所以为什么不编译自己的变体,使用__stdcall作为默认约定,这样就不会出现链接错误。

它甚至为每个Windows IDE(包括您正在使用的MSVC)都提供了项目,因此只需加载它,更改一个全局选项并点击compile(您可能需要更改某些必须显式使用__cdecl的位置,但编译器在构建它时会在这些位置出错)。

相关文章: