fail to install chromium embedded on C++ Builder from Delphi files

蓝咒 提交于 2019-12-01 13:32:41

问题


I want to install chromium embedded on C++ Builder v.6 . I already installed it once long time ago, and i developed some applications using TChromium. But after I reinstalled the OS, I'm trying to install this component again. When I compile the delphi pascal units I'm getting linker errors:

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

I just clicked Component -> Install Component -> Selected the cefvcl.pas and then when i click compile I'm getting above results.

How to install the chromium on BCB6, or how to solve this issues?

UPDATE:

also when I try to compile I'm getting Undeclared indentifer error for line where is this code:

TThread.Synchronize(nil, sync.Execute);

I'm just bypassing it by removing the syncronize , so the line after that look like:

sync.Execute;

UPDATE2

If I'm trying other way to install the component, I'm creating new package and save it, then add 4 files to it:

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

then i replace TThread.Synchronize(nil, sync.Execute); with sync.Execute; to bypass errors, but after that i still have one issue:

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

回答1:


You're installing the selected component into the IDE's default custom-component package. That package evidently makes reference to the TOutline component, but that component isn't defined in the package. Normally, TOutline is in the vclsmp package, so add vclsmp to your component package's requires list.

Preferably, use a different and more typical technique for installing the Chromium control. Instead of adding just one unit to the default custom-component package, install the ready-made package that comes with the Chromium component: Open the .dpk file corresponding to your Delphi version, compile it, and install it. If there isn't a package file for your product version, then simply add the four source files to a new package; use the existing .dpk files as examples.

Some of your troubles may be because the library was written to target later product versions than 2002's C++ Builder 6. For example, it seems to expect TThread to have a two-argument version of Synchronize and for there to be an AppEvnts unit. Simply deleting the things you don't have without understanding them isn't the way to fix that, especially when threads are involved.

All the source files reference cef.inc, which sets conditional defines according to the compiler version. If it doesn't recognize your compiler version, you'll have to edit it so that it sets the various version symbols and feature symbols to accurately describe your compilation environment.



来源:https://stackoverflow.com/questions/18643146/fail-to-install-chromium-embedded-on-c-builder-from-delphi-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!