Building Hydra for C++ Builder

All,

I am trying to build Hydra to be used in a C++ Builder project, but so far I have been unsuccessful. Here is what I have done so far:

  1. Installed Hydra following the installation instructions.
  2. Opened BuildPackages_D28.groupproj in RADStudio
  3. Modified settings by changing C++ output to “Generate all C++ Builder files”, built project, and installed project for the following projects:
    a. Hydra_Core_D28
    b. Hydra_VCL_D28
    c. Hydra_IDE_D28
  4. Created a C++ VCL project and added HyModuleManager component to form.
  5. Built VCL project and got several errors

Here are a few of the errors:

[bcc32c Error] dvp.h(256): reference to ‘ULONG_PTR’ is ambiguous
intsafe.h(82): candidate found by name lookup is ‘ULONG_PTR’
Hydra.Managed.mscoree_TLB.hpp(84): candidate found by name lookup is ‘Hydra::Managed::Mscoree_tlb::ULONG_PTR’.

[bcc32c Error] GdiplusHeaders.h(398): reference to ‘IStream’ is ambiguous
objidl.h(143): candidate found by name lookup is ‘IStream’
Hydra.Managed.mscoree_TLB.hpp(211): candidate found by name lookup is ‘Hydra::Managed::Mscoree_tlb::IStream’

[bcc32c Error] Hydra.VCL.Interfaces.hpp(118): ‘Imglist’ is not a class, namespace, or enumeration
Vcl.ImgList.hpp(29): ‘Imglist’ declared here

[bcc32c Error] Hydra.VCL.ModuleController.hpp(69): ‘Controls’ is not a class, namespace, or enumeration
Vcl.Forms.hpp(73): ‘Controls’ declared here

I was able to resolve the first error (ULONG_PTR is ambiguous) with the help of support by adding this to mscoree_TLB.hpp:

{$IFNDEF MSWINDOWS}
ULONG_PTR = LongWord;
{$ENDIF}

The other errors I am not sure how to resolve or if my configuration is the cause of them. Has anyone successfully done this and can point me in the right direction?

The Hydra components work with the default Delphi VCL project.

Ben

Hi,

I’ve sent you updated Hydra.Managed.mscoree_TLB.pas. it resolves these errors.

Hello Benjamin,

How did you manage to solve the error “Hydra.VCL.Interfaces.hpp(118): ‘Imglist’ is not a class, namespace, or enumeration”?

I’m struggling with the same error…

Thanks in advance!

Greetz,
Dennis Van Den Heuvel

Dennis,

I had to shelve this effort due to other priorities, but it is good to know I’m not the only one. If I find a solution, I’ll be sure to post here.

Ben

1 Like

I had a chance to revisit this one and figured out the solution to the remaining build errors referenced above. The C++ compiler doesn’t like VCL in the declaration so Vcl::Imglist::TCustomImageList becomes Imglist::TCustomImageList. I had 92 errors where i just needed to remove “Vcl::”.

Everything appears to work in C++ Builder for me now.

1 Like