Using VS Code and my tasks.json reads....
"label": "echo",
"type": "shell","command": "gcc","args":["-g", "${file}", "-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe"],
"group": {"kind": "build","isDefault": true}}
I'm getting an error on build...
Executing task: gcc -g c:\Users\user\CODEmainDirectory\Subdirectory\main.c -o c:\Users\user\CODEmainDirectory\Subdirectory\main.exe <
gcc.exe: error: c:UsersuserCODEmainDirectorySubdirectorymain.c No such file or directory
Works fine if I move the active file up to the main directory but not in a subdirectory.
Here's my c_cpp_properties.json for the includes.....
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"windowsSdkVersion": "10.0.18362.0",
"compilerPath": "C:/MinGW/bin/gcc.exe",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "gcc-x64"
},
{
"name": "GNU",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"windowsSdkVersion": "10.0.18362.0",
"compilerPath": "C:/MinGW/bin/gcc.exe",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "gcc-x64"
}
],
"version": 4