You want to edit C++ code, but struggle to find the right IDE. You are already running Linux on your computer, so why are the solutions so hard to find? The goal of this article is to help you find an open source IDE for C++ development on Linux.
Luckily, there are many good options for Linux C++ editing! We’re going to see some of these solutions put to the test.
Code:: Blocks
Code::blocks is a cross-platform, free, and open-source IDE for C/C++ development that includes compiling, auto code compilation, code coverage, profiling, debugging, code analysis, and more. It’s known for its outstanding performance and intuitive interface (drag and drop, tabs) and for allowing full breakpoints. It features a healthy ecosystem of plugins by the community and the Code::Blocks development team.
CLion
CLion by JetBrains is a commercial cross-platform IDE for C/C++. JetBrains enjoys a loyal following of developers that love their excellent code editors featuring superb code refactoring tools. CLion includes code analysis, CMake support, project modeling with intelligent code assistance. CLion is one of the few IDEs to have local and remote (via SSH) support, allowing you to code on your local machine but compile on remote servers.
While CLion is focused exclusively on C/C++, it is based on the JetBrains IDE framework with versions for the most popular programming languages.
Eclipse
Eclipse is one of the simplest and most powerful IDEs for C++ development. This is an open-source IDE that is available for Windows, macOS, and Linux. As this is a very simple IDE, beginners will find it very easy to use. It gives you useful features such as debugging, code compiling, auto code completion, profiling, refactoring, static code analysis, drag and drop feature, and so on.
Features:
- Coding shortcuts
- Autocorrection
- Refactoring
- Diffing files
- Organizing reports
- Formatting source codes
Official site: http://www.eclipse.org/cdt/
CodeLite
CodeLite is a powerful code editor that supports Windows, macOS, and Linux. It’s open-source software, meaning it’s free of cost.
CodeLite comes with features such as code compiling, next-generation debugging, profiling, class browser, static code analysis, code completion tool, refactoring, and so on. This IDE gives you a RAD tool that lets you build widgets based apps.
Features:
- Clang Based Code Completion Engine
- JavaScript Code Completion
- PHP Code Completion
- Word Completion (based on open editors)
- Git, Svn plugins
- Database Explorer
- Valgrind Support
- SpellChecker.
Official site: http://codelite.org/
Sublime Text
Sublime Text is an amazing code editor that you can use for many programming languages including C++. It is also the best IDE for c++. This is a very fast text editor, with a simple UI. This software is very easy to use.
Sublime Text is a modern IDE that comes with great features such as syntax highlighting, Goto Anything, Goto Definition, Command Palette, Multiple Selections, powerful API, split editing, and instant project switch.
Features:
1. Command Palette ctrl + shift + p
The command palette allows access to almost anything in the settings menus, call your package commands, change file syntax, handle Sublime projects.
For instance, it enables us to call Git commands to add, commit, branch, push and pull all from the command palette.
Keys: ctrl + shift + p
2. File Switching ctrl + p
Sublime Text provides a quick way to open up new files. Press the keys together and start typing the name of the file you want. Once it shows up, press enter and starts typing directly into that file!
Keys:
Windows: ctrl + p
Mac: ⌘ + P
3. Goto Symbols ctrl + r
A bunch of methods in large files is accessed by pressing ctrl + r and make them easier to find.
Keys:
Windows: ctrl + r
Mac: ⌘ + R
Sublime Text 3 has a new feature called Goto Definition that provides Sublime Text with more capabilities closer to an IDE.
4. Multi-Edit ctrl + click
This feature is absolutely the best feature of Sublime. Multi-edit can be used in either of the following ways:
- ctrl + shift + f AND alt + enter
- ctrl + d
- ctrl + click
5. Snippets
Type in a word, and it expands into your snippet. For example, typing lorem generates lorem ipsum text.
Key: Type a word that activates a snippet (ie, lorem) and press the tab.
5. Keyboard Shortcuts
The number of keyboard shortcuts in Sublime is astounding.
7. Projects
Projects are an integral part of my workflow in Sublime Text.
Using projects avoids digging in Windows Explorer or Finder to get the project you want and drag it into Sublime.
To Save a Project: Go into the command palette and type save the project
To Switch Projects: ctrl + alt + p
Official site: https://www.sublimetext.com/
NetBeans
NetBeans is a great and best IDE for C++ development, which provides many project-based templates. This open-source software has features such as refactoring, automatic indentation, syntax highlighting, bracket matching, code folding, and so on.
Features:
- Best Support for Latest Java Technologies
- Fast & Smart Code Editing
- Easy & Efficient Project Management
- Rapid User Interface Development
- Write Bug-Free Code
- Support for Multiple Languages
- Cross-Platform Support
- Rich Set of Community Provided Plugins
Official site: https://netbeans.org/downloads/8.0.1/
Qt Creator
Qt Creator is a useful best ide for C++ for building GUI-based cross-platform software applications for mobile, desktop, embedded devices, etc.
Using this software development tool, you can build high-quality graphical user-interfaces and high-performance applications and speed up your development.
Features
1. Design Tools
- Qt Design Studio
- Qt 3D Studio
- Qt Designer
- Qt Quick Designer
2. Development Tools
- Qt QmlLive
- Gamma Rays
- Emulator
- Qt Creator
- Qt Linguist
- qmake
- Meta-Object Compiler
- Qt Assistants
3. Frameworks
- Qt Core
- Qt GUI
- Qt Multimedia
- Qt Multimedia Widgets
- Qt Network
- Qt QML
Official site: https://www.qt.io/
CodeLite
CodeLite is another free and open-source IDE. It supports C/C++, PHP, and JavaScript and is built with the wxWidgets cross-platform toolkit, allowing it to run on Windows, macOS, Linux, and FreeBSD. The editor is based on the open-source Scintilla project.
CodeLite provides a simple but comprehensive user interface and includes support for project management, refactoring, code completion, syntax highlighting, debugging via GNU’s gdb, and integration with source code management systems like Git and Subversion.
The IDE also includes a wxWidgets creation tool that allows developers to design cross-platform graphical user interfaces easily.
Apache NetBeans
Apache NetBeans is an open-source, cross-platform IDE written in Java. It was a student project at Charles University in Prague, Czech Republic, and was initially named Xelfi. The name Xelfi name was a reference to the Delphi IDE for the Pascal programming language. Sun Microsystems bought NetBeans in 1999, then Oracle (which acquired Sun) released it to the Apache project in 2016.
NetBeans has excellent C/C++ support and features a debugger, code folding, projects, templates, and Qt Toolkit support. It also features plugins developed by an active community of contributors.
Qt Creator
Qt Creator is a commercial (with free trial) C++ cross-platform IDE for building superb GUI applications using the popular and feature-filled Qt toolkit.
In addition to offering the typical IDE features like compiling, debugging, code completion, profiling, and refactoring, Qt Creator developers benefit from a vibrant ecosystem of design and development tools centered around the Qt toolkit.
Additionally, Incredibuild has excellent integration with Qt creator to reduce Qt build time.
Dev C++
As its name suggests, Dev C++ is a fully-featured open-source IDE for C++. While Dev C++ boasts an impressive feature set, it only supports the Windows operating system. Despite this limitation, it includes support for GCC-based compilers like Cygwin and MinGW.
In addition, it has an integrated debugger (via gdb), international language support, code compilation, syntax-highlighting editor, a tool manager, find and replace options, CVS support, and code printing.
C++ Builder
C++ Builder is a cross-platform, proprietary IDE (offering a free trial) by Embarcadero, the same company that makes Delphi Pascal products.
It features a Clang-enhanced compiler with simple access to the Boost libraries, continuous integration, database management, version control integration, and a wide assortment of available plugins.
C++ Builder boasts fast compilation and a cross-platform debugger. It even supports native mobile app development on iOS and Android.
Xcode
Xcode is the native development IDE for macOS written by Apple. It was recently redesigned for the Big Sur release of macOS and features a pleasing and customizable interface for developers. It is the default choice for many macOS and iOS developers and includes all the tools you need to design, develop, and compile mobile and universal apps that run on both Apple Silicon and Intel x86_64 systems.
Xcode has a powerful code editor, project management system, source code management support, built-in documentation, an interface composer, mobile and macOS virtual environment for simulation and testing, a graphical debugging tool, continuous integration, static analysis, and support for C/C++ compilation via LLVM.
GNAT Programming Studio
GNAT Programming Studio is a free and open-source IDE that supports various programming languages, including C/C++. It is written in Ada and uses the GTK+ toolkit, giving it the ability to run on a wide assortment of platforms, including Windows, macOS, Linux, FreeBSD, and Solaris.
In addition to the standard IDE features of code editing, code completion, and compiling, GNAT supports debugging (both local and remote) as well as cross-compilation (compiling for another platform). GNAT can also be extended via plugins written in Python.
Kite
Kite is a proprietary, multi-programming language, cross-platform IDE that promotes an artificial intelligence code completion engine as its primary distinctive feature. Trained on 25 million source code files, it intelligently predicts what you’re going to type next to save you time. The company claims that developers save up to 47% keystrokes during development.
The Kite artificial intelligence engine is also available as an add-on to other popular IDEs and code editors like IntelliJ, Atom, Visual Studio Code, Sublime, PyCharm, and Vim.
Conclusion
Most people use some form of Integrated Development Environment (IDE) to code in. If you want to become a great programmer you need the right tools. There are lots of options out there, but some are better than others. These three IDEs are ones I recommend for C++ on Linux.