On Wed, Aug 8, 2012 at 3:40 PM, Moritz Lüdecke
<ritze skweez net> wrote:
Hi,
I solve the problem with "unknown type name 'size_t'". The order of the include folder was wrong. But the cursor to the definition of printf is still null.
In addition I didn't find a way, how I can get the include folders from the Makefile for the project, which is loaded in Anjuta.
For example the Anjuta project itself. I need the path to the include folder for glib (/usr/include/glib-2.0 and /lib/glib-2.0/include), so clang can parse the code correct.
The best and most reliable way is it to "record" the build output and parse the build process output lines (simple parsing, extracting -L / -I / -D switches)
This requires user to run at full build at least once and later the IDE can make use of the parsed output (cache it somewhere).
FYI: codelite & vim are both using this approach to handle makefile based projects (vim is actually using a wrapper script around gcc to record the build output)
In addition, you should also provide a way for user to manually add search paths / macros to the clang code completion.
Regards,
Moritz