vscode-docs icon indicating copy to clipboard operation
vscode-docs copied to clipboard

Using Clang "code ." command on macOS, command not found

Open celdin7 opened this issue 1 year ago • 1 comments

First time coder here, and I'm struggling to get off the ground. I'm using VS Code to learn C++, which recommends using Clang as the compiler for macOS, but when I use Terminal to connect with VS Code, the "code ." command isn't recognized.

Here's the VS Code tutorial I'm following: https://code.visualstudio.com/docs/cpp/config-clang-mac

I've installed the C++ extension and checked I have Clang installed like it says, but when I input the lines the tutorial gives into Terminal...

mkdir projects cd projects mkdir helloworld cd helloworld code .

it runs as expected until the last line. It just reads

-bash: code: command not found

celdin7 avatar Jun 24 '24 18:06 celdin7

@celdin7 Thanks for using VS Code for learning C++. I assume you have installed VS Code on your Mac? Can you make sure that VS Code is added to the PATH environment variable by following these instructions: https://code.visualstudio.com/docs/setup/mac#_launching-from-the-command-line

ntrogh avatar Jun 24 '24 19:06 ntrogh

Closing this issue as no response from author. Feel free to reopen when you have an update.

ntrogh avatar Aug 08 '24 15:08 ntrogh