When compiling Ada, when I change the build path to the GNAT build, all global commands (clear, sudo, gcc, etc.) don't work but when I change it to the global (default) command, the global commands work, but the Ada build isn't recognized.
How do I fix this?
Note: ➜ Ada = $, (using Oh My Zzh from Ada folder)
Terminal: (Note start & end are the same)
➜ Ada gcc -c main.adb
error: invalid value 'ada' in '-x ada'
➜ Ada PATH=/Users/Ryan/opt/GNAT/2020/bin
➜ Ada gcc -c main.adb
xcode-select: error trying to exec 'xcode-select': execvp: No such file or directory
gcc: error trying to exec 'as': execvp: No such file or directory
➜ Ada PATH=/bin:/usr/bin:/usr/local/bin:${PATH}
export PATH
➜ Ada gcc -c main.adb
error: invalid value 'ada' in '-x ada'
➜ Ada
Just do
PATH=/Users/Ryan/opt/GNAT/2020/bin:${PATH}
instead of
PATH=/Users/Ryan/opt/GNAT/2020/bin
You need to preppend path to GNAT, not replace whole PATH.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With