views:

214

answers:

2

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.

A: 

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.

apekarske
+2  A: 

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:

  1. Right click on the project in question.
  2. Select Properties at the bottom of the resulting menu.
  3. Expand C/C++ Geneeral
  4. Select Paths and Symbols
  5. Under Symbols add the offending symbol (leave Value blank)

That did the trick for us. We have now restored full traceability for our software.

John T