0

I'm currently programming a C++ Project which uses Freetype2 in Eclipse CDT. I like the automatic header parsing and code completion of Eclipse. However Eclipse fails to parse the standard FreeType2 include code:

#include <ft2build.h>
#include FT_FREETYPE_H

Eclipse doesn't understand that FT_FREETYPE_H is a macro pointing to a header file and therefore doesn't parse it and add its tokens to auto completion. Since Eclipse doesn't know the tokens I use in my code it signals lots of errors in the code. However the code compiles without a problem. Is there a way to get eclipse to parse those FreeType2 header files?

Simply replacing FT_FREETYPE_H with the include file it points to is not an option, because the same include technique is used in the FreeType2 Headers, which I don't want to edit.

Lukas Schmelzeisen
  • 2,934
  • 4
  • 24
  • 30

1 Answers1

1

Try right-clicking your project, go to Properties -> C/C++ General -> Paths and Symbols -> Symbols. Then define (for your compiler type) FT_FREETYPE_H as your actual header file name.

Alexandru C.
  • 3,337
  • 1
  • 25
  • 27
  • Thanks, that did it. However I'm suprised this works since `FT_FREETYPE_H` is defined in `ft2build.h` which is included just fine. – Lukas Schmelzeisen Jun 20 '12 at 12:04
  • Compiler and Indexer are two different entities :). You can check indexer properties under `C/C++ General` -> `Indexer`, maybe you can find some options there also. – Alexandru C. Jun 20 '12 at 12:10
  • I meant `ft2build.h` contents are parsed just fine by the indexer. Seems like it fails to then use the results of that to parse `#include FT_FREETYPE_H`. – Lukas Schmelzeisen Jun 20 '12 at 12:28
  • When i add FT_FREETYPE_H to the GNU C++ symbol list, what do I specify the value as? – webber Apr 09 '13 at 16:44