[cfe-dev] Clang complains

Csaba Raduly rcsaba at gmail.com
Tue Mar 26 01:23:44 PDT 2013


On Mon, Mar 25, 2013 at 6:49 PM, Devchandra L Meetei  wrote:
> Clang 3.2 complains following but the system has the stdlib.h in
> /usr/include.
> What could be the reason? is clang specifically looking for cstdlib?
> /home/govind/CodeSpace/pegasus/src/Pegasus/Common/Config.h:133:10: fatal
> error: 'cstdlib' file not found
>>>>>>>#include <cstdlib> <<<<<<<<<
>         ^
> 1 error generated.
> [govind at localhost pegasus]$ locate stdlib.h
>>>>>/usr/include/stdlib.h <<<<<<<<<<
> /usr/include/bits/stdlib.h
> /usr/include/boost/cstdlib.hpp
> /usr/include/c++/4.5.1/tr1/stdlib.h
> /usr/include/freetype2/freetype/config/ftstdlib.h
> /usr/share/man/man0p/stdlib.h.0p.gz

You told the compiler to look for a file named "cstdlib". The compiler
complained that it cannot find a file named "cstdlib".
The fact that you have a file named "stdlib.h" does not help the
compiler in any way.

_IF_ the compiler found "cstdlib" and saw that it contains   #include
<stdlib.h>   then yes, having a stdlib.h would be important.

GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++
The Tao of math: The numbers you can count are not the real numbers.
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds

More information about the cfe-dev mailing list