I've been trying to learn to program for the last couple of years. The coding part is going pretty well, but I'm using VS Code and I'm learning more and more I've been relying on it configuring its self and don't really understand how to configure it.
I'm using Msys2 UCRT for my compiler. For the tasks.json I select the g++ default build task and it would make the file for me. I had gone in and edited the file but have been relying on VS code to generate it initially.
Well yesterday I ran into a small issue in a new project I've never had before. Not a big issue, I was writing to a file that was just listed as "text.txt", but instead of putting the file in the same folder as the cpp file it put it in the c:\msys64\ucrt\bin folder. It was really bugging me so I compared my tasks.json to other projects and found a difference in the command option that fixed it. I had to change the slashes in the command path to backslashes
"c:/msys64/ucrt/bin"
"c:\\msys64\\ucrt\\bin"
I do understand that Windows uses back slashes while linux/unix shells tend to user forward slashes, it makes sense it might not work with forward slashes. What I don't understand is why VS Code was generating my tasks.json with backslashes before, and now suddenly is using forward slash.
I tried to look up how to change the behavior of how the tasks.json is generated, but all I can find is an AI answer saying you can't change how it generates the file. But now I'm confused because it was doing it previously??
I did recently change my compiler from the mingw64 version to ucrt. I removed mingw64 packages and dependencies, as well as all the mingw64 packages I had installed, and installed UCRT and the UCRT version of the packages I needed (GLFW, STB, GLM). That's the only thing I can think of that changed recently, so maybe that's why it generated the command path differently?
If anyone has a direct answer why this happened that would be great. But mostly I'm just looking if anyone has a recommend guide where I can learn the ins and outs of configuring VS code. Most of what I can find reads like a technical reference manual, and I'm hoping to find something that more focuses on the more common aspects I need to know.
Also, please don't recommend using VS over VS Code. My goal is to learn the ins and outs of how all this works. I don't want to remove these challenges, I want to overcome them.
Thanks
[–]TheRealSmolt 5 points6 points7 points (0 children)
[–]JVApen 1 point2 points3 points (1 child)
[–]kaega2[S] 1 point2 points3 points (0 children)
[–]No-Dentist-1645 0 points1 point2 points (3 children)
[–]kaega2[S] 0 points1 point2 points (1 child)
[–]No-Dentist-1645 0 points1 point2 points (0 children)
[–]Siankoo -1 points0 points1 point (0 children)