Search code examples
eclipseeclipse-cdt

creating a define only used by eclipse


I have project that was created in another IDE that is build for a specific microcontroler. In the code faris used quite often and it is comprehended by the IDE and compiler.

I would like to use eclipse to edit the code, because it is more convinient to use. But it generates a lot of warnings and errors in the editor because he can not resolve the far.

I could create a macro #define far, but I would have to remove it when I want to compile the code. I don't compile with eclipse, because getting the compiler to work there is cumbersome and might introduce problems.

So is there a possibility that eclipse itself can handle the far for its syntax check?


Solution

  • After I searched a bit more I found an answer here: https://www.eclipse.org/forums/index.php/t/72375/

    Go to the menu:

    Project -> Properties -> C/C++ General -> Path and Symbols -> Symbols

    and add a Symbol called far with the value /* */.

    I just left the value empty and it worked.