【问题标题】:Using TEmbeddedWB in C++ Builder在 C++ Builder 中使用 TEmbeddedWB
【发布时间】:2020-02-26 21:04:01
【问题描述】:

我在使用TEmbeddedWB 为来自https://github.com/7even11/Delphi-EmbeddedWB 的 RAD Studio Rio 10.3.3 编译测试应用程序时遇到了一点困难

我只是将 EmbeddedWB 组件放在表单上并编译。它在 Delphi 中编译得很好。在 C++ Builder 中出现错误:

[bcc32c 错误] EWB.IEConst.hpp(101):预期的不合格 ID

EWB.IEConst.hpp 文件中,这发生在以下几行中:

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);

错误在最后一行 (CACHEGROUP_ATTRIBUTE_BASIC)。我不明白为什么上面会触发错误,因为上面还有一堆 static const System::Int8 并且它们可以编译。

有什么想法吗?

【问题讨论】:

  • 检查 CACHEGROUP_ATTRIBUTE_BASIC 之前是否已经使用 #define 宏声明过。如果是这样,该宏的内容将替换EWB.IEConst.hpp 中的CACHEGROUP_ATTRIBUTE_BASIC,从而创建无效声明。
  • @RemyLebeau 谢谢,这确实是问题所在,与WinInet.h 和其他标题冲突。

标签: delphi c++builder c++builder-10.3-rio tembeddedwb


【解决方案1】:

正如@RemyLebeau 所指出的,与WinInet.h 和其他标头中先前定义的常量存在冲突。我更新了https://github.com/7even11/Delphi-EmbeddedWB 上的更改,以使 C++ Builder 程序员更容易编译和使用该组件。

【讨论】:

    猜你喜欢
    • 2016-11-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-09-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-02-19
    相关资源
    最近更新 更多