Thanks everyone for your help. I am getting somewhere … but I have a new block.
I followed the steps listed https://code.visualstudio.com/docs/cpp/config-msvc
There are certainly many things in these steps that aren’t ever even touched on in the Unreal Class, but that aside, I just want to get SOMETHING working. So, in following these steps, I did resolve the IncludePath problem by setting the Compiler Path stuff up as Marc_Hemming suggested, and I added the Launch.json and Task.Jason as indicated in the tutorial.
Now, when trying to compile (using the Build method, Shift+Ctrl+B, it says that “‘D:\Program’ is not recognized as an internal or external command, operable program”. So it seems that somewhere it is interpreting the space after D:\Program Files (x86)… as the end of the command path, or at least, that’s all I can think.
Here are all the files I added:
c_cpp_properties.json:
{
“configurations”: [
{
“name”: “Win32”,
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"compilerPath": "D:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.20.27508/bin/Hostx64/x64/cl.exe",
"windowsSdkVersion": "10.0.17763.0",
"intelliSenseMode": "msvc-x64",
"cStandard": "c11",
"cppStandard": "c++17"
}
],
"version": 4
}
tasks.json:
{
“version”: “2.0.0”,
“tasks”: [
{
“label”: “msvc build”,
“type”: “shell”,
“command”: “cl.exe”,
“args”: [
“/EHsc”,
“/Zi”,
“/Fe:”,
“helloworld.exe”,
“helloworld.cpp”
],
“group”: {
“kind”: “build”,
“isDefault”: true
},
“presentation”: {
“reveal”:“always”
},
“problemMatcher”: “$msCompile”
}
]
}
launch.json:
{
“version”: “0.2.0”,
“configurations”: [
{
“name”: “(msvc) Launch”,
“type”: “cppvsdbg”,
“request”: “launch”,
“program”: “{workspaceFolder}/helloworld.exe",
"args": [],
"stopAtEntry": true,
"cwd": "{workspaceFolder}”,
“environment”: ,
“externalConsole”: false
}
]
}
helloworld.cpp:
#include
#include
#include
using namespace std;
int main()
{
vector<string> msg {"Hello", "C++", "World", "from", "VS Code!"};
for (const string& word : msg)
{
cout << word << " ";
}
cout << endl;
}
Any help would be most appreciated, and thanks for all the help so far!
Matt