CPP Environment Setup

C++ Environment Setup

Setting Up Your Local Environment

If you’re still interested in configuring your C++ environment, you’ll need the following two software components installed on your computer.

_title - under_page_title -->

Text Processing Tool

This tool will serve as your platform for inputting your program. A few examples of such tools include Windows Notepad, OS Edit command, Brief, Epsilon, EMACS, as well as vim or vi.

The specific name and version of the text processing tool can differ across various operating systems. For instance, Windows employs Notepad, while both Windows and Linux or UNIX systems can utilize vim or vi.

The files generated within your chosen text processing tool are referred to as source files. For C++, these files usually bear extensions such as .cpp, .cp, or .c.

A functional text processing tool is essential to commence your C++ programming journey.

C++ Compilation System

This constitutes an authentic C++ compiler responsible for converting your source code into a finalized executable program.

While the majority of C++ compilers aren’t concerned about the extension applied to your source code, many default to .cpp unless otherwise specified.

Among the commonly utilized and freely available compilers, the GNU C/C++ compiler stands out. Alternatively, if you possess compatible Operating Systems, compilers from HP or Solaris are also viable options.

Installing the GNU C/C++ Compiler

Installation on UNIX/Linux Systems

For those employing Linux or UNIX systems, verify the presence of GCC on your machine by executing the following command in the terminal:

$ g++ -v

If GCC is already installed, you should receive output akin to the following:

Specifications in Use
Platform: i386-redhat-linux
Configuration: ../configure –prefix=/usr …….
Threading: posix
gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)

If GCC isn’t present, you’ll need to install it manually. Detailed instructions can be found at https://gcc.gnu.org/install/

Installation on Mac OS X

Mac OS X users can conveniently obtain GCC by downloading the Xcode development environment from Apple’s official website. Installation guidelines are straightforward and easy to follow.

Access Xcode through developer.apple.com/technologies/tools/

Installation on Windows

To set up GCC on Windows, you’ll need to install MinGW. Visit the MinGW homepage, www.mingw.org, and navigate to the MinGW download section. Obtain the latest version of the MinGW installation package, often named MinGW-.exe.

When installing MinGW, make sure to include gcc-core, gcc-g++, binutils, and the MinGW runtime at a minimum. You may choose to install additional components as well.

Append the ‘bin’ subdirectory from your MinGW installation to the PATH environment variable. This will enable you to reference these tools using their basic names directly in the command line.

Once the installation concludes, you’ll have the capability to run gcc, g++, ar, ranlib, dlltool, and several other GNU utilities directly from the Windows command line.


Discover more from PiEmbSysTech

Subscribe to get the latest posts sent to your email.

Leave a Reply

Scroll to Top

Discover more from PiEmbSysTech

Subscribe now to keep reading and get access to the full archive.

Continue reading