Eclipse CDT 和未知标签
目前,我们正在考虑将我们的开发环境从 CodeWright(它早已被 Borland 放弃)迁移到 Eclipse。 我们使用 Eclipse 进行 Perl、PHP 和一些 Windows C++ 开发并取得了巨大成功。
然而,问题出现在我们的嵌入式环境中,它在 makefile 中使用了一些 Excel 似乎无法理解的定义。 下面是一个示例(更改了值以保护有罪者):
F_FOO unsigned char foo(ptr *this)
{
}
其中 F_FOO 在 makefile 中定义,因为
F_FOO=@foobar
Eclipse 将突出显示 F_FOO 并将其标记为语法错误。 这会导致各种可追溯的悲伤。
在某种程度上,这种情况也发生在 Builder C++ 中的一些代码中,其中 Eclipse 不知道如何处理关键字 __fastcall。
对此有任何帮助吗(我知道我们不能是唯一遇到此问题的人) )将不胜感激。
Currently we are looking at moving our development environment from CodeWright (which has long since been abandonned by Borland) and moving to Eclipse. We are using Eclipse for Perl, PHP and some Windows C++ development with much success.
The issue comes up however with our embedded environment which uses - in the makefile - some defines that Excel does not seem to understand. Here's an example (whith values changed to protect the guilty):
F_FOO unsigned char foo(ptr *this)
{
}
where F_FOO is defined in the makefile as
F_FOO=@foobar
Eclipse will highlight the F_FOO and flag it as a syntax error. That causes all kinds of grief with traceability.
To some exctent this also happens with some code in Builder C++ where Eclipse does not know how to handle the keyword __fastcall.
Any help on this (I know we can't be the only ones running into this issue) would be highly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我们尝试了标头指令中的#defines,但由于项目的大小以及文件的数量庞大,结果证明这不是一种太实用的方法。
通过使用 Eclipse 工具,我们找到了一个适合我们的解决方案,详细信息如下:
这对我们来说是成功的。 我们现在已经恢复了软件的完全可追溯性。
We tried the #defines in the header directive but because of the size of the project as well as the sheer number of files, that turned out to be a not too practical approach.
Tooling around Eclipse we found a solution that works for us and it is detailed below:
That did the trick for us. We have now restored full traceability for our software.
您可以为 Eclipse 不知道的事情创建一个包含在#defines 中的头文件。 然后,作为构建的一部分,让它使用该头文件的空版本,这样它实际上并不使用这些定义。
You could make a header file that is included with #defines for the things Eclipse doesn't know about. Then as part of your build have it use an empty version of that header file so it doesn't actually use those defines.