[cfe-dev] fatal error: 'cstdio' file not found

Clark Gaebel cg.wowus.cg at gmail.com
Fri Jul 16 18:51:22 PDT 2010


It seems like clang isn't finding my standard C++ headers. Lately I've
been playing with cross-compliers and gcc, (gcc works fine still), and
when I tried to build my code again with clang, it stopped finding headers.

NOTE: The C headers are found fine, it's only the C++ headers that are
affected.

clark at clark-laptop /tmp $ clang++ --version
clang version 1.1 (branches/release_27)
Target: x86_64-pc-linux-gnu
Thread model: posix
clark at clark-laptop /tmp $ g++ --version
g++ (Gentoo 4.5.0 p1.2, pie-0.4.5) 4.5.0
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

clark at clark-laptop /tmp $ cat t.cpp
#include <cstdio>

int main() { return 0; }
clark at clark-laptop /tmp $ g++ t.cpp
clark at clark-laptop /tmp $ clang++ t.cpp
t.cpp:1:10: fatal error: 'cstdio' file not found
#include <cstdio>
         ^
1 diagnostic generated.

So I have two questions:

  1) How can I get clang to show the header search path? clang++
--verbose doesn't seem to work.
  2) Any idea what the problem might be?

Thanks for your help,
  -- Clark



More information about the cfe-dev mailing list