0

How do you setup eclipse so that it parses and underlines errors for C as you type like it does for Java?

chacham15
  • 13,719
  • 26
  • 104
  • 207

1 Answers1

3

Install the CDT extension.

Sadly, CDT is more limited than JDT... it can only find the absolute basic syntax errors itself (missing semicolons etc.), in part because a C or C++ build can be so heavily altered by flags to the tool chain, preprocessor variables etc. It can only highlight most errors and warnings after a build by parsing the output.

One thing you can do that might make your life easier is to enable "Build on resource save". You can find that option under the "Behavior" tab of the "C/C++ Build" section of your project properties. This works pretty well for small projects that build quickly but could get annoying if it takes a while to build your project.

Hannes Ovrén
  • 21,229
  • 9
  • 65
  • 75
Vinay Pai
  • 7,432
  • 1
  • 17
  • 28
  • Thats what I've been using, the problem is that the error highlighting that it does is only a parse of the make output. it doesnt parse on the fly like it does with java. – chacham15 Dec 28 '10 at 00:33
  • @chacham15: Expanded answer. Short version: CDT can only do limited on-the-fly parsing. However, enabling auto-save might make your life easier. – Vinay Pai Dec 28 '10 at 01:03