Search code examples
delphic++builderc++builder-10.3-riotembeddedwb

Using TEmbeddedWB in C++ Builder


I am having little difficulty compiling a test app using TEmbeddedWB for RAD Studio Rio 10.3.3 from https://github.com/7even11/Delphi-EmbeddedWB

I just drop the a EmbeddedWB component on the form and compile. It compiles fine in Delphi. In C++ Builder there is an error:

[bcc32c Error] EWB.IEConst.hpp(101): expected unqualified-id

In EWB.IEConst.hpp file this happens in following lines:

static const System::Int8 BINDSTATUS_SERVER_MIMETYPEAVAILABLE = System::Int8(0x36);
static const System::Int8 BINDSTATUS_SNIFFED_CLASSIDAVAILABLE = System::Int8(0x37);
static const System::Int8 BINDSTATUS_64BIT_PROGRESS = System::Int8(0x38);
#define VER_NUM L" 14.70.0"
extern DELPHI_PACKAGE System::UnicodeString _MaskedChars;
static const int ADDRESS_NOT_VALID = int(0x7ffbfe1c);
#define ASS_MESS L"Please assign a WebBrowser before using this feature."
static const System::Int8 CACHEGROUP_ATTRIBUTE_BASIC = System::Int8(0x1);

The error is at the last line (CACHEGROUP_ATTRIBUTE_BASIC). I don't see anything why the above would trigger an error as there is a bunch of static const System::Int8 above as well and they compile.

Any ideas what's the problem here?


Solution

  • As noted by @RemyLebeau there was a conflict with previously defined constants in WinInet.h and other headers. I've updated the changes on https://github.com/7even11/Delphi-EmbeddedWB to make it easier for C++ Builder programmers to compile and use the component.