Win32 Tutorials


Setting Up Your Environment

Tutorials > Win32 > Setting Up Your Environment


This tutorial will show you how to setup your environment to program Win32 in C / C++.

  • If you would like to program using Windows and Microsoft Visual Studio.NET, please look at the Visual Studio.NET section.
  • If you would like to program using Windows and a free compiler and development environment (Dev-C++), please look at the Dev-C++ section.

Microsoft Visual Studio.NET

Visual Studio.NET (VS.NET) should already be installed. Open up VS.NET and click on File > New Project.
Select Visual C++ Projects under Project Types and select Win32 Projects under Templates

New Project

Enter a project name such as Test and click OK
The wizard will appear. Click on Application Settings, select Windows Application and tick Empty Project.

Application Wizard

Click Finish. If you do not see your Test project in a Solution Explorer window, click on View > Solution Explorer Right-click on Source Files in the Solution Explorer and select Add > New Item
Highlight a C++ File(cpp) and type in main.cpp for the filename. Click OK
You will be presented with a blank page. If you press F5 now to compile your file and click Yes to build it and No to continue when build errors occur, you will be presented with an error similar to the following "error LNK2019: unresolved external symbol _WinMain@16 referenced in function _WinMainCRTStartup".
Do not worry about this as this is because you do not have any code written. You have now learnt how to successfully set up a VS.NET project to start programming.


Dev-C++ should already be installed. I am using the Dev-C++ Version 5 beta. This can be downloaded from

Click on File > New > Project
Highlight Windows Application and enter Test as a project name.
Click OK and then select where you would like your project to be stored.

New Project

You will be presented with a file containing a number of lines of code. This code will be explained in a future tutorial. For now, click on Execute > Compile and then click Save to save your main.cpp file.

You should receive a blank window. Close the window to terminate the program.

You have successfully set up Dev-C++ to program Win32 in C++ and you now know how to start a new project.

Congratulations! You now know how to go about compiling your source files.

Please let me know of any comments you may have : Contact Me

< Tutorial 01 - What Is Win32? Tutorial 03 - WinMain Function >

Back to Top

All Rights Reserved, © Zeus Communication, Multimedia & Development 2004-2005

Read the Disclaimer