I just found out that the <stdlib.h> and <stdio.h> headers are located in the /usr/include folder in Ubuntu server, but I don’t find sys/types.h.
And I start to suspect the compiler won’t actually use the header file in the /usr/include folder.
Is this true, and where is the file located?
My Debian box (and hopefully Ubuntu haven’t butchered it too much in their zeal) has it in
/usr/include/sys/types.h.Your best bet is to execute:
However, keep in mind that the development stuff may not even be installed on a server. Unless it’s a server for a compiler farm, it wouldn’t surprise me if the compiler and a bunch of other stuff was not part of the default install.
If the compiler is locating it somewhere and you just don’t know where, you can use something like:
to find out where it’s getting it from.
That
gcccommand line:-E);-x c); and-), in this case from theechostatement.The final
grepjust strips out the unimportant lines leaving the ones that are likely to contain the location of the included file.