Background Knowledge:
- I've setup msys64 on the desktop, and I've set this up on my laptop before.
- It works perfectly on the laptop apart from msys64 not supporting wildcard statements anymore(but its not a big problem).
- I followed all the same steps to set it up on my desktop.
Problem:
I have a code snippet where i use a ifstream to read a txt file but the compiler doesn't open the file. I check the json and the cwd: isn't set to ${fileDirname} even though its automatically built. Still doesn't work, and i figure out my command: has forward slashes rather than backwards ones. Change both of those and it finally works as intended. The reason i got a problem is when i auto build on my laptop, it does these 2 things automatically, while my desktop builds broken. Is there anyway i can fix this?
Previous Json ( What does read any files in the directory and what auto builds for my desktop):
"command": "C:/msys64/ucrt64/bin/g++.exe",
"options": {
"cwd": "C:/msys64/ucrt64/bin"
},
^^This is the difference between the working and the previous json.
Working Json(What my laptop builds and what works on the desktop):
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: g++.exe build active file",
"command": "C:\msys64\ucrt64\bin\g++.exe",
"args": [
"-fdiagnostics-color=always",
"-g",
"${file}",
"-o",
"${fileDirname}\${fileBasenameNoExtension}.exe"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Task generated by Debugger."
}
],
"version": "2.0.0"
}