How to Install Code Blocks for C++ on MacOS?
Last Updated :
29 Oct, 2021
Code::Blocks is a free and open-source IDE that supports a plethora of C++ compilers like GCC, Clang, and Visual C++. It is written in C++ and makes use of wxWidgets as the GUI toolkit. Code::Blocks is focused on C, C++, and Fortran development. It has a custom build system and optional Make support. In this article, we will discuss methods using which we can install Code Blocks on MacOS.:
Features of Code::Blocks:
- Cross-Platform: Works on MacOS, Linux and Windows.
- Multiple C++ Compilers: It supports GCC, MinGW, Digital Mars, Microsoft Visual C++, Borland C++, LLVM Clang, Watcom, LCC, and the Intel C++ compiler.
Installing Code::Blocks on MacOS:
On MacOS, Code::Blocks relies on the Xcode distribution for its compiler. So, first, install Xcode from App Store and then continue with the following steps :
Step 1: Go to the official SourceForge of CodeBlocks project using this link, to download the application package. Click on the Download button.
Code::Blocks on SourceForge.com
Step 2: Open the downloaded file to initiate installation.
Package extraction begins.
Step 3: Drag the CodeBlocks icon to the application folder to begin copying Codeblocks to the application folder.
Step 5: Open the Code::Blocks app. The following prompt is displayed.
Step 5: Go to System Preferences -> Security and Privacy. Click the padlock in the lower-left corner of the dialog box, and then enter your system password when prompted, to allow changes.
Step 6: Select the option Allow Applications Downloaded from: App Store and identified developers. Close the Prompt appeared in Step 5.
Click on the Open Anyway button in the Security & Privacy dialog box.
Step 7: Another Dialog box appears. On this dialog box, click on Open to start Code::Blocks.
Step 8: Go to File -> New -> Project. On the New from template dialog, select Console Application and click Go.
Step 9: Select the C++ option and click Next. Keep clicking Next and then click Finish to create your first C++ project.
Step 9: On the menu bar, go to Settings -> Environment. Change the text in the field "Terminal to launch console programs" to:
osascript -e 'tell app "Terminal"' -e 'activate' -e 'do script "$SCRIPT"' -e 'end tell'
Step 10: Open the main.cpp file from the left project pane. It contains Hello World program by default. Go to Build-> Build and Run. The program should run successfully on a terminal.
Similar Reads
How to Install Code Blocks for C++ on Linux? Code::Blocks is a free IDE( an integrated development environment), for C/C++ and FORTRAN languages. It is a cross-platform IDE and available for Windows, Mac, and Linux, In this article, we are going to discuss various methods using which we can install Code Blocks on Linux.: Installation Code Bloc
2 min read
How to Install Code Blocks for C++ on Windows? In this article, we will look into the process of installing code blocks for C++ on windows. Installation Code Blocks for C++ on Windows: Follow the below steps to install Code Blocks for C++ on windows: Step 1: Open Your Web Browser Step 2: Go to the Search Panel and Search for "Code Blocks" Step 3
2 min read
How to Install Eclipse for PHP on MacOS? Eclipse is a free open source platform, Integrated Development Environment (IDE) with the help of which applications are made using the Java programming languages and other programming languages are also used such as C/C++, PERL, Python, Ruby, etc. It is composed of many plug-ins and is designed to
1 min read
How to Install COBOL on MacOS? COBOL is a compiled English-like computer programming language designed for business use. It is an imperative, procedural, and, since 2002, object-oriented language. COBOL is primarily used in business, finance, and administrative systems for companies and governments. In this article, we will look
2 min read
How to Install C# on MacOS? C# is a programming language that is used for general purposes. But the C# programming language is classified as one of the High-Level programming languages. Unlike the C programming language, the C# programming language can be used in other tasks. There might be a significant similarity between the
4 min read