clang on Windows - incorrect header file path

[亡魂溺海] 提交于 2019-12-13 07:42:19

问题


I built clang using VS2013 and then ran it from the command line with a -v option (clang -v testfile.c). Among the things it reported was:

#include <...> search starts here:

C:\Program Files (stand-alone)\LLVM\bin..\lib\clang\3.7.0\include

C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include

I don't understand why it is even looking at the Microsoft headers in the first place. I do not have an environment variable named INCLUDE. I verified this by doing "set INCLUDE" from the command line getting a message saying there was no such environment variable. So, where and why is clang getting this information and how do I stop it? During the compile several warnings (not errors) occur regarding some of the things in Microsoft header files too.

The version it reports is:

clang -cc1 version 3.7.0 based upon LLVM 3.7.0svn default target i686-pc-windows-msvc

I understand the i686-pc-windows part, but why the msvc part? If that means it was built with msvc then that makes sense, but if it means that clang was built to run with msvc support, I don't understand why.

来源:https://stackoverflow.com/questions/28980565/clang-on-windows-incorrect-header-file-path

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!