[cfe-dev] Getting clang header search path

Edward Diener eldlistmailingz at tropicsoft.com
Fri Aug 15 06:28:18 PDT 2014


On 8/15/2014 12:21 AM, Craig Tenenbaum wrote:
> In this case, the clang binary needs even just a cursory file name to
> get far enough into its logic to output the info you want. Since you
> seem to be in Windows, try the following (warning: I'm a Linux user and
> only know this because I googled it):
>
> clang++ -E -v -### -x c++ NUL

Here is my output:

> C:\Programming\VersionControl\bninja_installed_clang\bin>clang++ -E -v -### -x c
> ++ NUL
> clang version 3.6.0 (215674)
> Target: i686-pc-windows-gnu
> Thread model: posix
>  "C:\\Programming\\VersionControl\\bninja_installed_clang\\bin\\clang++.exe" "-c
> c1" "-triple" "i686-pc-windows-gnu" "-E" "-disable-free" "-disable-llvm-verifier
> " "-main-file-name" "NUL" "-mrelocation-model" "static" "-mdisable-fp-elim" "-fm
> ath-errno" "-masm-verbose" "-mconstructor-aliases" "-target-cpu" "pentium4" "-v"
>  "-dwarf-column-info" "-resource-dir" "C:\\Programming\\VersionControl\\bninja_i
> nstalled_clang\\bin\\..\\lib\\clang\\3.6.0" "-fdeprecated-macro" "-fdebug-compil
> ation-dir" "C:\\Programming\\VersionControl\\bninja_installed_clang\\bin" "-ferr
> or-limit" "19" "-fmessage-length" "80" "-mstackrealign" "-fno-use-cxa-atexit" "-
> fobjc-runtime=gcc" "-fcxx-exceptions" "-fexceptions" "-fdiagnostics-show-option"
>  "-fcolor-diagnostics" "-o" "-" "-x" "c++" "NUL"

I do not see header path information anywhere.

>
> If you're using  the powershell, I think you can substitute '$nul' (no
> apostrophes) for NUL
>
>
> On Fri, Aug 15, 2014 at 12:10 AM, Edward Diener
> <eldlistmailingz at tropicsoft.com
> <mailto:eldlistmailingz at tropicsoft.com>> wrote:
>
>     On 8/14/2014 11:31 PM, Nikola Smiljanic wrote:
>
>         -v does if you give it a file.
>
>
>     What is the purpose of the 'file' that you pass to it ?
>
>
>
>         On Fri, Aug 15, 2014 at 1:15 PM, Edward Diener
>         <eldlistmailingz at tropicsoft.__com
>         <mailto:eldlistmailingz at tropicsoft.com>
>         <mailto:eldlistmailingz at __tropicsoft.com
>         <mailto:eldlistmailingz at tropicsoft.com>>>
>         wrote:
>
>              On 8/14/2014 9:14 PM, Nikola Smiljanic wrote:
>
>                  Nope, it's -v
>
>
>              I do not think so:
>
>
>         C:\Programming\VersionControl\____bninja_installed_clang\bin>____clang++
>
>                  -v
>                  clang version 3.6.0 (215674)
>                  Target: i686-pc-windows-gnu
>                  Thread model: posix
>
>
>         C:\Programming\VersionControl\____bninja_installed_clang\bin>____clang
>
>                  -v
>                  clang version 3.6.0 (215674)
>                  Target: i686-pc-windows-gnu
>                  Thread model: posix
>
>
>         C:\Programming\VersionControl\____bninja_installed_clang\bin>____clang++
>
>                  -###
>                  clang version 3.6.0 (215674)
>                  Target: i686-pc-windows-gnu
>                  Thread model: posix
>
>
>         C:\Programming\VersionControl\____bninja_installed_clang\bin>____clang
>
>                  -###
>                  clang version 3.6.0 (215674)
>                  Target: i686-pc-windows-gnu
>                  Thread model: posix
>
>
>              None of these return the header search path.
>
>
>
>                  On Fri, Aug 15, 2014 at 11:12 AM, Nikola Smiljanic
>                  <popizdeh at gmail.com
>         <mailto:popizdeh at gmail.com>
>
>         <mailto:popizdeh at gmail.com
>         <mailto:popizdeh at gmail.com>>
>
>         <mailto:popizdeh at gmail.com
>         <mailto:popizdeh at gmail.com>
>
>
>         <mailto:popizdeh at gmail.com
>         <mailto:popizdeh at gmail.com>>>> wrote:
>
>                       -###
>
>
>                       On Fri, Aug 15, 2014 at 9:16 AM, Edward Diener
>                       <eldlistmailingz at tropicsoft.____com
>                  <mailto:eldlistmailingz at __tropicsoft.com
>         <mailto:eldlistmailingz at tropicsoft.com>>
>                       <mailto:eldlistmailingz@
>         <mailto:eldlistmailingz@>__trop__icsoft.com <http://tropicsoft.com>
>
>                  <mailto:eldlistmailingz at __tropicsoft.com
>         <mailto:eldlistmailingz at tropicsoft.com>>>>
>                  wrote:
>
>                           What is the clang command that shows me the header
>                  search path ?
>
>                           I built the latest clang on Windows targeted
>         at gcc using
>                           mingw64/gcc4.9.1 32-bit, which is in the PATH.
>         But when I
>                           execute clang it is not finding the C++ header
>         files.





More information about the cfe-dev mailing list