When I started programming in C++, it confused me a lot to setup the environment for compiling the code on Windows platform. In my office, we had an enterprise version of Microsoft Visual Studio and at the time, I was not aware of any opensource compiler and I had limited access to the internet also. So I used to download Ubuntu and used vi, g++ for writing programs. But still I was looking for a full fledged free IDE for writing projects on Windows.

Then I came across a framework named Qt and along with it, an IDE named QtCreator. Still it needed a compiler toolset and thus I came to know about MinGW and it satisfied my needs at that time. Later only I came to know that there is a community edition for Microsoft Visual Studio and that you don’t have to pay for using it for non commercial purposes.

Now years have passed, but still I find that there is no proper documentation for setting up a development environment for writing programs in C++, apart from using Visual studio toolset and IDE. I will try to address this problem and try to describe the advantages and disadvantages of different approaches.

Easy way

Download the latest community edition of Visual Studio from Microsoft website and start developing projects in it straight away. There are many tutorials available in the internet which provides step by step instructions. So I won’t be detailing those here.

The advantages of using the Visual Studio are,

  • Quick turn around time in setting up and writing your first program.

  • They have a quite good completion tool, named IntelliSense which the provides suggestions for your statements.

  • You don’t have to know the actual build process happening behind the scenes and can get your program up and running, quite easily.

  • There are different GUI elements for setting different properties and adding additional libraries, which kind of eases the development process.

However from a developer perspective, there are major disadvantages,

  • It abstracts the entire build process and provides little information to the developer, about how the program is being actually compiled. If you want to know the behind the scenes’ processes of compilation, this is a major disadvantage.

  • The project file you create is not cross platform compatible and can be built only in Windows. This is not the standard way, that has been followed in the open source world.

  • The IDE is very resource intensive and will slow down your machine, even for relatively smaller projects.

  • The Visual Studio IDE had only support for ‘sln’ files for projects. But recently they have added support for CMake projects, but it is still under development.

  • Easiness of setting up properties and adding libraries using GUI comes with a cost. It is highly impossible to edit those otherwise. If those cannot be easily edited using a simple plain text editor, I feel it is not developer friendly. I have the same opinion about XCode tool in MacOS. I feel, it kind of makes the developers a bit dumb.

So now that we have seen the pros and cons, what are the other alternatives we have? I will be addressing that in the next part of this article.