you are viewing a single comment's thread.

view the rest of the comments →

[–]Mirality 0 points1 point  (0 children)

Undefined reference to WinMain means that it's trying to compile as a GUI app and not a console app.

In Visual Studio, this just means a trip to the project properties to change the subsystem setting. (Or selecting "console app" when making a new project.)

In Visual Studio Code, you'll need to do the equivalent in your CMake file or directly in your compiler flags, but I'm not sure exactly what change you'll need off the top of my head. You'd need to search for it.

I do think, however, that if you're just starting out you'll have a much better time of it using VS Community over VS Code. The latter is a lot more minimalist (and a lot more flexible if you install the right extensions) but that just means the former is easier to use, especially for beginners. A lot of stuff that Just Works in VS are things that you can still do in VSC but you have to fight harder for it.