'When changing build target to release in Visual Studio, thousands of errors appear

I setup a simple Empty Project on Visual Studio 2022. I attached some GLFW / Glad sources to it so that I could do a basic rendering project.

I've been editing it for around two days with no issues. It runs fine.

I went to build it and noticed the debug version builds the debug console and everything into the EXE, which I didn't want.

I tried to do a release version instead, and when I switch to release, suddenly all of my includes in my code start pushing like 100 errors.

enter image description here

When I fix all the include errors (Using VS's recommended fix tool), the errors go away, but then when I try to build, thousands of more errors appear, and I have no clue what I'm doing wrong.

It's at a point right now where I can only use the debug version with the console popup, which is really irritating, considering I'm developing a desktop application. I cant have these debug tools popping up while I'm trying to use a piece of software.

My full code so far is right here: https://github.com/ArctanStudios/GLSL-Bay

I've done some searching on my own but I haven't found anything helpful.

When asking people on other sites I was told that I just "screwed something up" providing absolutely zero help or an explanation as to what I could do to fix this issue. Id appreciate any ideas.



Solution 1:[1]

You can refer to the Document: Set debug and release configurations in Visual Studio.

Visual Studio projects have separate release and debug configurations for your program.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Minxin Yu - MSFT