Skip to main content

C++ Setup using VS Code and TDM-GCC Compiler (Windows)

You need to use this blog along with the YouTube Video present here for better understanding of the installation and the overall process. 

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 -

  1. C/C++

  2. C++ Intellisense

  3. 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!

Comments

Post a Comment

Popular posts from this blog

How I tackled lack of motivation problem during my Placements?

Suffering from a lack of motivation? Well, that is something which is common to every human being out there at some point in time in their lives.  There are some facts that you need to grasp very well in your mind -  Everyone has got 24 hours.  Everyone faces a lack of motivation at some point in time.  No one can study for 24 hours straight.  Most of the people have the available resources to study around you. Example - Phone, Internet, Books, and Materials, etc.  Most people tend to waste their time in mobile games, series, movies, etc.  Not everyone gets up at 4 o clock and starts reading Data Structures and Algorithms and starts coding right away.  Not everyone is god gifted.  So, if this is the case with everyone, then where does the difference actually come up? How are some people more productive and achieve more as compared to others?  The difference comes up in the way how some have trained their mind to react to situations and t...

What if I am not from CSE or ISE? Does that affect my placement in any way, even if I am good?

The bitter truth about placements in UVCE is - for other branches like Mechanical, Electrical, etc. There are not a lot of core companies coming to the college for placements. Not every second or third company coming to college is a core company. Most of them are for Software Engineering profiles or profiles related to computer science fields. Even if the core companies come for placements, the number of students they usually pick is very less. Just confirm with the Placement Office at your college and ask about Placement Opportunities for the branch that you are currently in. So, my simple advice to all the juniors out there in other branches of engineering would be -  Start learning to code.  There will be more details provided to you, but for security reasons, I have hidden them here.  The list above shows the eligible branches for the respective companies . Most of them will be having a job role which involves computers, coding, and all computer...