Fix- MacOS GCC error cannot open source file '_stdio.h' (dependency of 'stdio.h')
April 19, 2021
MacOS GCC error cannot open source file ‘_stdio.h’ (dependency of ‘stdio.h’):
This error was raised with gcc on MacOS Big Sur. It normally comes if you are trying to compile any file using gcc. For example, if you are trying to compile a C program, using gcc:
gcc example.cThis error might be thrown.
Fix for this issue:
This issue was resolved after reinstalling xcode-select. Use the below command to reinstall it:
xcode-select --installIf it not fixed, you can try to run the .c file directly from XCode. XCode will detect if there is any dependency left to download and it will install it and this should be fixed.