C++ Setup using VS Code and TDM-GCC Compiler (Windows)
Using this setup we will be installing VS Code and TDM-GCC Compiler which is a good way to compile and run C++ programs in Windows. During my school days we used to execute programs in Turbo C++ compiler, which is now discontinued for good. The UI wasn't intiuitive at all for Turbo C++ software and it looked something like the one shown in the image below. But we do have great memories of programming in C++ using Turbo C++ Software in our school days. 😃
![]() |
| Turbo C++ (discontinued) UI |
Coming back, as for the Linux based systems (Ubuntu, Debian etc, I guess GCC already comes as part of the package. So Linux users can compile their C++ Programs from day 1 of their installations. 👍
To install GCC compiler on Mac OSX, you need to download and install "Command Line Tools for Xcode, which is available in Apple's developer page. You can follow this document for installation in MacOS - https://mkyong.com/mac/how-to-install-gcc-compiler-on-mac-os-x/
Download Links for TDM-GCC Compiler and VS Code
VS Code Download - https://code.visualstudio.com/download
TDM-GCC Compiler Download - https://sourceforge.net/projects/tdm-gcc/
How to check the installation was successful?
For VS Code - The application should open up and you should be able to type stuff using the editor. Not sure if I had to say you that.
For Mingw Installation - Open Command Prompt and just type in "g++ --version"
If you see something like above then there is some problem with the installation!
Otherwise you will see some lines with details about the compiler written there.
User Snippets for C++
The Template Code for C++ is present here - https://gist.github.com/T-O-T-N/aa7ffd870aa4e327c405a2db54e0a2dd#file-cpp-json
You can change and modify it according to your preferences!
Which are the VS Code Extensions that I need to install?
I have installed the following 3 extensions for C++ as of now -
C/C++
C++ Intellisense
GitHub Theme (Because I like it!)
You can explore more extensions and let me know if you find something interesting!
![]() |
| My Extensions for C++ and VS Code Theme |
I think this is pretty much it for the installation part.
Just spend a good amount of time using the editor and writing some simple C++ program.
Happy Coding!



Great blog. Easy to follow.
ReplyDelete