0

我正在尝试在C++ builder xe中开发一个 dll ,我需要解析一个XML file并且为此我使用C++ builder xe的解析器,它生成一个允许我操作. 问题是我在编译时遇到了由生成的代码引起的错误。这是生成的代码:xml file

_

di_IXMLDevlinkAbstractionLayer __fastcall GetDevlinkAbstractionLayer(_di_IXMLDocument Doc)
{
  return (_di_IXMLDevlinkAbstractionLayer) Doc->GetDocBinding("DevlinkAbstractionLayer", __classid(TXMLDevlinkAbstractionLayer), TargetNamespace);
};

_di_IXMLDevlinkAbstractionLayer __fastcall GetDevlinkAbstractionLayer(TXMLDocument *Doc)
{
  _di_IXMLDocument DocIntf;
  Doc->GetInterface(DocIntf);
  return GetDevlinkAbstractionLayer(DocIntf);
};

_di_IXMLDevlinkAbstractionLayer __fastcall LoadDevlinkAbstractionLayer(const UnicodeString& FileName)
{
  return (_di_IXMLDevlinkAbstractionLayer) LoadXMLDocument(FileName)->GetDocBinding("DevlinkAbstractionLayer", __classid(TXMLDevlinkAbstractionLayer), TargetNamespace);
};

我得到的错误是:

  [ILINK32 Error] Error: Unresolved external '__fastcall System::TObject::GetInterface(_GUID&, void *)' referenced from D:\DOCUMENTS AND SETTINGS\SESA269906\DESKTOP\DEV\DEVLINKABSTRACTION\DEBUG\WIN32\COOLINGCONFIGDALDLL.OBJ
[ILINK32 Error] Error: Unresolved external '__fastcall Strhlpr::UnicodeFree(System::UnicodeString&)' referenced from C:\PROGRAM FILES\EMBARCADERO\RAD STUDIO\8.0\LIB\WIN32\DEBUG\VCLE.LIB|ustring
[ILINK32 Error] Error: Unresolved external '__fastcall Strhlpr::WideFree(System::WideString&)' referenced from C:\PROGRAM FILES\EMBARCADERO\RAD STUDIO\8.0\LIB\WIN32\DEBUG\VCLE.LIB|wstring
[ILINK32 Error] Error: Unresolved external '__fastcall Strhlpr::WideAssign(System::WideString&, System::WideString&)' referenced from C:\PROGRAM FILES\EMBARCADERO\RAD STUDIO\8.0\LIB\WIN32\DEBUG\VCLE.LIB|wstring

我认为错误是包含在一个生成的文件中导致了问题。有任何想法吗?

4

1 回答 1

1

我通过取消选中项目选项中的链接器选项“动态 RTL”和“与运行时包的链接”来解决问题;在包选项中。我不知道这和最初的问题有什么关系......

于 2013-06-17T14:09:59.770 回答