.\hello not working error shows zsh: command not found

have tried to uninstall and reinstall visual studio code, home-brew and X-code. No luck. Have not found internet searches that seem to provide option. Newbee to C++ and VS Code. Any help greatly appreciated.

I suspect this has to do with permissions but I’m not sure. If I enter, ls -l, in VS Code for the relevant folder, the files are listed, however, the hello program is listed in the color red.

btw, if I open the hello program from the MacOS Finder, it runs no problem. But from the Terminal in VS Code, it doesn’t work?

MacOsX 12.3 on Macbook Pro M1 Max

1 Like

Hi there!

The terminal used in the course is different than the one used in MacOS, so the syntax is a little different. VSCode uses the system terminal for whichever OS it is installed on.

Try ./hello

1 Like

Thank you @Tuomo_T . I’m not sure how I got it working but ultimately I managed. I believe the issue has to do with permissions on MacOS. Whenever I debug, I’m asked to grant access to I my documents folder, which is a minor inconvenience, but it works. Thanks!!!

I’m glad you found a solution!

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms