[HELP] Having trouble getting VS code to compile

I am currently on Section 0 of the Unreal Engine C++ Developer course getting all the prerequisites installed, I tried redownloading VS Code and installing the extension for C++ but when I go to compile in a new terminal I receive an error:

“cl: The term ‘cl’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name or if a path was included, verify that the path is correct and try again.”

(Picture) https://gyazo.com/c2f3117a7e0babf6f641a22311002cba

Before I had started the course I was messing around with python on VS Code and had a python extension, not sure if that might of tampered with anything, but I did try reinstalling vs code.

Any help is a big help.

Im having the same issue. its like the path was not installed when installing C++ extension. Im on windows

I’m on a Mac so I’m not 100% sure but I think the PC instructions said to use the developer command prompt in the setup, it looks like you’re using powershell, which may not have the same environment as the dev cmd prompt…you might try using that instead.

Thank you for the response. After doing a bunch of research about this and trying to figure it out the instructions of just installing the microsoft c++ extension does not get the the cl.exe into the path for the terminal doesn’t recognize the program. Others online have other suggestions for this I wanted to follow the course recommendations so I don’t get confused later but I may just install cygwin to avoid troubles like this in the future. I typically develop on Mac but didn’t want to for this course.

I’ve used cygwin quite a bit for work over the years and there are almost always incompatibilities when interacting with pure windows programs, so beware…

You can always explicitly update your PATH environment variable in computer properties/advanced/environment variables to find your cl. But using the developer command prompt will almost certainly fix this because it makes sure cl is in PATH.

How do you access the developer command prompt. From VS Code I right click the “triplex.cpp” and open in terminal. This is where cl is not available for execute that trick.

If you follow the video, they have you 1) first open developer command prompt, and 2) start code from the dev cmd prompt command line. They mention that otherwise, the compilation won’t work. This way VS code will inherit all the settings of the dev cmd prompt and you will be able to find cl.

I believe you access developer command prompt by clicking on the windows key and just start typing “developer…”

Hey, they show how to open VS code via the developer command prompt in Section 1 Video 9 at 6m40s.
Furthermore, to run the compiled game from the terminal in VS Code I had to type:

./triplex

instead of just “triplex” like it is shown later on in the course.

Hope this helps :slight_smile:

Sorry to necro-post, but I’m in the process of learning and this was the first major issue I found. What does “./” do in C++ to execute the run that just typing in triplex failed to do? I just want to understand why this worked for later application.

Thanks!

Nothing to do with C++. some terminals require you to always specify the path (I assume to distinguish between commands from executables).

. just means the current working directory i.e. “here”

For example terminal is in

/home/dan/projects

doing

./triplex

Just means

/home/dan/projects/triplex

Privacy & Terms