-1

我想安装嵌入在 C++ Builder v.6 上的 chromium。很久以前我已经安装过一次,我使用 TChromium 开发了一些应用程序。但是在我重新安装操作系统后,我试图再次安装这个组件。当我编译 delphi 帕斯卡单元时,我收到链接器错误:

Build
  [Linker Error] Unresolved external '__fastcall Outline::TCustomOutline::~TCustomOutline()' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
  [Linker Error] Unresolved external '__fastcall Outline::TCustomOutline::TCustomOutline(Classes::TComponent *)' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
  [Linker Error] Unresolved external '__fastcall Outline::TCustomOutline::SetOutlineStyle(Outline::TOutlineStyle)' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
  [Linker Error] Unresolved external '__fastcall Outline::TCustomOutline::SetOutlineOptions(System::Set<Outline::TOutlineOption, 0, 2>)' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
  [Linker Error] Unresolved external '__fastcall Outline::TCustomOutline::GetPicture(int)' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
  [Linker Error] Unresolved external '__fastcall Outline::TCustomOutline::SetPicture(int, Graphics::TBitmap *)' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
  [Linker Error] Unresolved external '__fastcall Outline::TOutlineNode::GetFullPath()' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
  [Linker Error] Unresolved external '__fastcall Outline::TOutlineNode::HasChildren()' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
  [Linker Error] Unresolved external '__fastcall Outline::TOutlineNode::getFirstChild()' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
  [Linker Error] Unresolved external '__fastcall Outline::TOutlineNode::GetNextChild(int)' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
  [Linker Error] Unresolved external '__fastcall Outline::TCustomOutline::Insert(int, const System::AnsiString)' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
  [Linker Error] Unresolved external '__fastcall Outline::TOutlineNode::GetLastChild()' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
  [Linker Error] Unresolved external '__fastcall Outline::TCustomOutline::Add(int, const System::AnsiString)' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
  [Linker Error] Unresolved external '__fastcall Outline::TCustomOutline::AddChild(int, const System::AnsiString)' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
  [Linker Error] Unresolved external '__fastcall Outline::TCustomOutline::Get(int)' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
  [Linker Error] Unresolved external '__fastcall Outline::TCustomOutline::Clear()' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
  [Linker Error] Unresolved external '__fastcall Outline::TOutlineNode::SetExpandedState(bool)' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
  [Linker Error] Unresolved external '__fastcall Outline::TCustomOutline::SetSelectedItem(int)' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
  [Linker Error] Unresolved external '__fastcall Outline::TCustomOutline::Click()' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
  [Linker Error] Unresolved external '__fastcall Outline::TCustomOutline::GetSelectedItem()' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
  [Linker Error] Unresolved external '__fastcall Outline::TCustomOutline::Expand(int)' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
  [Linker Error] Unresolved external '__fastcall Outline::TCustomOutline::Loaded()' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
  [Linker Error] Unresolved external 'Outline::TCustomOutline::' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
  [Linker Error] Unresolved external '__fastcall Outline::TCustomOutline::DefineProperties(Classes::TFiler *)' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
  [Linker Error] Unresolved external '__fastcall Outline::TCustomOutline::DrawCell(int, int, const Types::TRect&, System::Set<Grids::Grids__3, 0, 2>)' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
  [Linker Error] Unresolved external '__tpdsc__ Outline::TCustomOutline' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
  [Linker Error] Unresolved external '__fastcall Outline::TCustomOutline::SetItemHeight(int)' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
  [Linker Error] Unresolved external '__fastcall Outline::TCustomOutline::StoreBitmap(int)' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp
  [Linker Error] Unresolved external '__fastcall Outline::TCustomOutline::SetStyle(Outline::TOutlineType)' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp

我只是单击了组件-> 安装组件-> 选择了 cefvcl.pas,然后当我单击编译时,我得到了以上结果。

如何在 BCB6 上安装铬,或者如何解决这个问题?

更新:

同样,当我尝试编译时,我收到未声明的 indentifer 错误,该行代码在哪里:

TThread.Synchronize(nil, sync.Execute);

我只是通过删除 syncronize 绕过它,所以之后的行看起来像:

sync.Execute;

更新2

如果我尝试以其他方式安装组件,我将创建新包并保存它,然后向其中添加 4 个文件:

cefreg.pas
ceflib.pas
cefvcl.pas
cefgui.pas

然后我替换 TThread.Synchronize(nil, sync.Execute); 与同步。执行;绕过错误,但之后我仍然有一个问题:

[Linker Fatal Error] Fatal: Unable to open file 'APPEVNTS.OBJ'
4

1 回答 1

1

您正在将所选组件安装到 IDE 的默认自定义组件包中。该包显然引用了该TOutline组件,但该组件未在包中定义。通常,TOutlinevclsmp包中,所以将 vclsmp 添加到组件包的需求列表中。

最好使用不同且更典型的技术来安装 Chromium 控件。与其在默认的自定义组件包中只添加一个单元,不如安装 Chromium 组件附带的现成包:打开与您的 Delphi 版本对应的.dpk文件,编译并安装它。如果您的产品版本没有包文件,则只需将四个源文件添加到新包中;使用现有的.dpk文件作为示例。

您的一些麻烦可能是因为该库是针对比 2002 年的 C++ Builder 6 更高的产品版本编写的。例如,它似乎期望有一个AppEvnts单元TThread的两个参数版本。简单地删除你没有的东西而不理解它们并不是解决这个问题的方法,尤其是当涉及到线程时。Synchronize

所有源文件都引用cef.inc,它根据编译器版本设置条件定义。如果它无法识别您的编译器版本,则必须对其进行编辑,以便它设置各种版本符号和功能符号以准确描述您的编译环境。

于 2013-09-05T18:32:04.753 回答