DesignIntf 在bpi中找不到但与dcp一起使用

问题描述 投票:0回答:2

在Rad Studio Rio中,我为Delphi创建了一个包。在PAS单元中,我添加:

  uses DesignIntf;

编译器抱怨“未找到DesignIntf​​”。添加DesignIntf​​.dcp作为参考可以解决问题。

现在,如果我从C ++ Builder创建相同的包,我添加“使用DesignIntf​​;”在PAS单元中,如果我添加DesignIntf​​.bpi作为参考,则错误不固定。

为什么在Delphi中DesignIntf​​.dcp解决了这个问题,但是DesignInt.bpi没有为C ++ Builder解决它与完全相同的代码?

更新;

这是win32平台。下图显示了如何引用designintf.bpi,但我继续收到错误。如果包是用于Delphi并使用designintf.dcp,它可以正常工作。

enter image description here

c++builder vcl
2个回答
1
投票

在Delphi和C ++中,您的设计时包需要引用DesignIDE包才能使用DesignIntf单元。

请阅读Embarcadero的文档:

Compiling C++ Design-Time Packages That Contain Delphi Source

Creating or Extending a Package to Use the Tools API


1
投票

最后我解决了它。我错过了在Delphi Compiler选项下添加-LUDesignIDE。它在http://docwiki.embarcadero.com/RADStudio/Rio/en/Compiling_C%2B%2B_Design-Time_Packages_That_Contain_Delphi_Source解释

原因是因为我混合了Delphi和C ++代码。

© www.soinside.com 2019 - 2024. All rights reserved.