What Is the Equivalent of Solution Files in Linux C++ Ide

C++ IDE for Linux?


Initially: confusion

When originally writing this answer, I had recently made the switch from Visual Studio (with years of experience) to Linux and the first thing I did was try to find a reasonable IDE. At the time this was impossible: no good IDE existed.

Epiphany: UNIX is an IDE. All of it.1

And then I realised that the IDE in Linux is the command line with its tools:

  • First you set up your shell

    • Bash, in my case, but many people prefer
    • fish or
    • (Oh My) Zsh;
  • and your editor; pick your poison — both are state of the art:

    • Neovim2 or
    • Emacs.

Depending on your needs, you will then have to install and configure several plugins to make the editor work nicely (that’s the one annoying part). For example, most programmers on Vim will benefit from the YouCompleteMe plugin for smart autocompletion.

Once that’s done, the shell is your command interface to interact with the various tools — Debuggers (gdb), Profilers (gprof, valgrind), etc. You set up your project/build environment using Make, CMake, SnakeMake or any of the various alternatives. And you manage your code with a version control system (most people use Git). You also use tmux (previously also screen) to multiplex (= think multiple windows/tabs/panels) and persist your terminal session.

The point is that, thanks to the shell and a few tool writing conventions, these all integrate with each other. And that way the Linux shell is a truly integrated development environment, completely on par with other modern IDEs. (This doesn’t mean that individual IDEs don’t have features that the command line may be lacking, but the inverse is also true.)

To each their own

I cannot overstate how well the above workflow functions once you’ve gotten into the habit. But some people simply prefer graphical editors, and in the years since this answer was originally written, Linux has gained a suite of excellent graphical IDEs for several different programming languages (but not, as far as I’m aware, for C++). Do give them a try even if — like me — you end up not using them. Here’s just a small and biased selection:

  • For Python development, there’s PyCharm
  • For R, there’s RStudio
  • For JavaScript and TypeScript, there’s Visual Studio Code (which is also a good all-round editor)
  • And finally, many people love the Sublime Text editor for general code editing.

Keep in mind that this list is far from complete.


1 I stole that title from dsm’s comment.

2 I used to refer to Vim here. And while plain Vim is still more than capable, Neovim is a promising restart, and it’s modernised a few old warts.

Which IDE for C++ software can I use for targeting Windows, Linux and OSX?

QtCreator. It's awesome, slick and everything.

While it is not as feature rich as some competitors, it does many things just right that others don't.

I would say it is the one truly cross-platform IDE that is competitive to single-platform solutions. And it comes with tight integration of a very powerful and clean cross-platform toolkit. Something that you need for most cross-platform applications by itself.

IDE for debugging 'C source in linux


  • Code::Blocks
  • Anjuta
  • KDevelop
  • Or check on StackOverflow

How to build a Visual C++ Project for Linux?

We're using CMake for Linux projects. CMake can generate KDevelop and Visual Studio project files, so you can just create your CMake file as the origin of platform-specific IDE files. The KDevelop generator is fine, so you can edit and compile in KDevelop (which will in turn call Make).

On the other hand, if you have nothing fancy, you can use CMake or just Make to build the thing on Linux, if you want to stay with your solution file (which is what I'm currently doing for a library with test applications). This approach gets complicated when your build process is more than just "throw these files at the compiler and let's see what it does", so the CMake solution is in my opinion a good thing for cross-platform development.



Related Topics



Leave a reply



Submit