C++ 生成器 [C++ 错误] sysmac.h(58): E2040 声明错误终止
我想创建一个不使用 VCL 的 C++ Builder DLL 项目。 但我在 sysmac 中收到此错误。 有谁知道这个错误的可能原因?
I want to create a C++ Builder DLL project that doesn't use VCL. But I get this error in sysmac. Does anyone know the possible cause of this error?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
据猜测(因为距离我使用 C++ Builder 已经过去了大约 5 年),这是因为 sysmac.h 需要 VCL,从此 VCL 概述
At a guess (because it's about 5 years since I would with C++ Builder) it's because sysmac.h requires the VCL, from this VCL Overview
E2040 声明错误终止 (C++)
声明具有额外或不正确的终止符号,例如位于函数体后面的分号。
在类中声明的 C++ 成员函数在标题和左大括号之间有分号也会生成此错误。
http://docwiki.embarcadero.com/RADStudio/XE3 /en/E2040_Declaration_termerated_in Correctly_%28C%2B%2B%29
E2040 Declaration terminated incorrectly (C++)
A declaration has an extra or incorrect termination symbol, such as a semicolon placed after a function body.
A C++ member function declared in a class with a semicolon between the header and the opening left brace also generates this error.
http://docwiki.embarcadero.com/RADStudio/XE3/en/E2040_Declaration_terminated_incorrectly_%28C%2B%2B%29
这意味着您在项目中的某个位置包含了 VCL 标头 - 最有可能在编译为 C 单元的文件中(因此会出现语法错误)。
您可以在项目选项中打开“扩展错误信息”来追踪负责的模块。
This means that you're including a VCL header somewhere in your project - most likely in a file that is compiled as C unit (hence the syntax errors).
You can turn on "Extended error information" in the project options to track down the responsible module.