在使用Xerces-C 3.0时,我可以使用__stdcall约定吗?我收到链接器错误
Can I use __stdcall convention while using Xerces-C 3.0? I get linker errors
在我的项目中,使用__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
的位置,但编译器在构建它时会在这些位置出错)。
- Netbeans 10:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)
- CMake 错误:链接器命令失败,退出代码为 1 和 cpp.o 文件
- clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用) - 体系结构的未定义符号 x86_64:
- 如何修复 clang: 错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)
- Android NDK.Build命令失败.未定义的引用.clang++:错误:链接器命令失败,退出代码为1
- 使用cmake错误链接boost日志
- 错误:链接器命令失败,退出代码为 1(使用 -v 查看调用):在 Macbook 上
- C++ XCODE ld:找不到体系结构x86_64 clang 的符号:错误:链接器命令失败,退出代码为 1(使用 -
- clang:错误:链接器命令失败,C++代码中的退出代码为 1(使用 -v 查看调用)
- 静态库中的 g++ 错误链接函数
- 未定义的参考错误链接天然函数Android
- C++编译错误:ld:找不到体系结构x86_64 clang 的符号:错误:链接器命令失败,退出代码为 1(使用 -v
- QT Q_PROPERTY错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)
- ld:找不到体系结构x86_64 clang 的符号:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)
- OSX MOJAVE -LD:架构X86_64 clang找不到符号:错误:链接器命令失败,出口代码1
- C 错误链接器命令失败了出口代码1(使用-V查看调用)
- LD:架构x86_64 clang找不到符号:错误:链接器命令失败,出口代码1(使用-v to See
- 聚输出错误 - 链接列表
- Xcode链接器错误:链接器命令失败,退出代码为1(使用-v查看调用)
- 尝试构建C DLIB示例无法与数百个未定义的参考错误链接