I am trying to learn to program with glut.
In a tutorial, I see the author created 2 projects, one is win32 console application, another is win32 application.

If I happen to use int main() in win32 application/ WinMain() in win32 console application,
the project will be dead.

I would like to ask, if anyone knows, that what is the difference between this 2 type of project, and why does one use console app to write gui based program?


Jeezz, I am so confuse now. Thank you.

You don't use a console app to write a GUI based program (well, you can, but its tricky for new programmers). The Win32 console project is for console projects, the Win32 Project is for GUI applications. They are compiled slightly differently at the command line and one requires an int main(...) entry point while the other requires a int WINAPI WinMain(...) entry point.

IF you ever need to change this option from within the project go to linker->System

and where it says subsystem choose either:
Console (/SUBSYSTEM:CONSOLE)
Windows (/SUBSYSTEM:WINDOWS)

The point of Glut is to test OpenGl without having to mess with a Window API so stick to console projects.

it looks like people like to create a console project then kill the console windows?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.