[cfe-dev] Suggestion for improving #include error message

Justin Johansson procode at adam.com.au
Thu Oct 29 14:54:54 PDT 2009


Christian Adåker wrote:
> On Thu, Oct 29, 2009 at 1:53 PM, Renato Golin <rengolin at systemcall.org> wrote:
>   
>> However, there could be a separate tool, to find headers on your
>> system given your configuration and compilation options, which IDEs
>> could run upon "file not found" errors. Or maybe a '-vv' mode that
>> would print lots of warnings, debug information that IDEs could parse
>> and do intelligent stuff with it.
>>     
>
> I'm new to clang too, but as far as I can see clang already has an
> option -print-search-dirs that shows the search paths for programs and
> libraries.
>
> This could perhaps be extended to show include paths as well? (Or, if
> gcc compatibility is an issue, maybe a new option
> -print-include-dirs.)
>
> I'm not sure that the #include compiler error needs to be more
> informative, but if it should, it could instead mention
> -print-search-dirs. That would be less cluttered, but still give a
> hint.
>
> //Christian
>
>   

Thanks Renato and Christian for your replies.  I missed the
-print-search-dirs option and that is certainly helpful.  Christian's
suggestion re hinting -print-search-dirs would be a good idea idea (IMHO);
I don't think that would be too noisy as with missing #include
files there is not much point outputting too many additional compile
errors anyway (?)

cheers, Justin




More information about the cfe-dev mailing list