Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22000

fatal error: stdio.h: No such file or directory on macOS

$
0
0

I am trying to compile a simple "hello world" program with gcc on macOS and for some reason I get the error "fatal error: stdio.h: No such file or directory"

The interesting thing is that, if I compile using the entire path, so

/usr/bin/gcc hello.c

then everything works out fine. Although, if I run

which gcc

I get

/usr/local/bin/gcc

and with this path the compilation gives me the same error.

I used homebrew to install gcc, Xcode is up do date.

I really need to get this work, because I need to compile a code that uses both fortran and c modules, nd I have no idea how to modify the Makefile. Fortran compilation with gfortran works out fine. Thanks!


Viewing all articles
Browse latest Browse all 22000

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>