[cfe-dev] How to compile using Clang?

Jean-Daniel Dupas devlists at shadowlab.org
Wed May 9 00:48:27 PDT 2012


Le 9 mai 2012 à 02:41, Michal Stefanow a écrit :

> On 4 May 2012 08:19, Csaba Raduly <rcsaba at gmail.com> wrote:
> make CXXFLAGS=-v
> 
> This will pass the -v flag to clang, causing it to print the
> directories where headers are searched, among other things. Perhaps
> this will help understand why the compiler doesn't find sys/types.h (I
> suspect this option:  -isysroot /Developer/SDKs/MacOSX10.6.sdk).
> 
> That is actually very good hint :)
> 
> Here is full output: http://pastebin.com/HhVEVLTG
> 
> Most important parts:
> #include "..." search starts here:
> #include <...> search starts here:
>  .
>  deps/
>  deps/http-parser
>  deps/json_spirit
>  /usr/bin/../lib/clang/3.1/include
> End of search list.
> In file included from deps/http-parser/http_parser.c:21:
> deps/http-parser/http_parser.h:28:10: fatal error: 'sys/types.h' file not found
> #include <sys/types.h>
> 
> ***
> 
> https://www.google.com/search?q=makefile+include+path
> 
> I haven't used makefiles for a while - can you help me solving this "puzzle"? :)
> 

We can't without knowing what is installed on your machine.
You use the flags "-isysroot /Developer/SDKs/MacOSX10.6.sdk" to tell clang to lookup headers in "/Developer/SDKs/MacOSX10.6.sdk"
Bu we can't tell you if this folder exists, and what it contains.


> Thanks
> Michal
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

-- Jean-Daniel








More information about the cfe-dev mailing list