C++ Setup with Code Blocks

ABDULKADIR ERYILDIRIM
2 min readMay 26, 2018

--

C++ Setup with Code Blocks

I was practicing with SoloLearn, which seems promising and practical in sharpening programming skills.

They recommend to use CodeBlocks IDE for C++. I have downloaded and installed Code Blocks. However, I confronted a problem: it could not find the default compiler, which ise GNU GCC compliler. In fact, I was using a brand new computer lacking any C/C++ compiler. CodeBlock gave an error when I tried to build a simple C++ code: failed to find GNU GCC compiler.

Then, I figured out that Code Blocks does not contain any C/C++ compiler. One must install it to be able to compile. Therefore, I downloaded and installed MinGW. After installing MinGW, you need to change the compiler settings of Code Block so that it can find the compiler in the correct location. Go to Settings tab and then Toolchain executables. Please pay attention to the default names: you might need to change them accordingly ( only mingw-g++.exe might not work)

For me, the following directory and setting worked:

C:\Program Files\mingw-w64\x86_64–8.1.0-posix-seh-rt_v6-rev0\mingw64\bin

--

--