-
Notifications
You must be signed in to change notification settings - Fork 17.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'stdlib.h' file not found under macOS Catalina 10.15.4 #39232
Comments
Related #27921 |
What happens if you write a C file #include <stdlib.h>
#include <stdio.h>
int main() { printf("Hello, world\n"); return 0; } and try to compile that using If you get the same error about |
Thanks for sharing, one of the comment in that issue works for me: |
Thanks for following up, below are my test result: The problem has been solved after I run: brew unlink llvm@4 |
From the discuss above and my issue( I installed an older version clang6 pkg and leave an export in my .bash_profile), all these caused by clang. So |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
xcode-select --install
go run main.go
What did you expect to see?
Hello world !
What did you see instead?
runtime/cgo
_cgo_export.c:3:10: fatal error: 'stdlib.h' file not found
I had installed the Command Line Tools by $xcode-select --install
The text was updated successfully, but these errors were encountered: