Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

... your C++ IDE does not show the errors as you type ? If you're using sub-par tools by choice you cannot complain..


The best thing that I found that works is Clion. Everything else in the ecosystem lacked polish, or ergonomic, or consistency. And Clion is lacking in these too, just not as much.

Maybe I'm setting the bar too high for an old technology? I don't know.

What IDE (or just DE) would you recommend that works well?


Qt Creator is fine, Kate with LSP plugin is also fine. I use the latter because I prefer, well, editor-style editors. The main reason is that I prefer to do build and run related things on the console, it's more quick and flexible.


I use QtCreator. Here's my experience while editing, what do you think is missing ? https://streamable.com/xm1xw9


This looks a lot more responsive/snappier than Clion. I sometimes have to wait half a minute for syntax highlighting to "catch up" (not always, so I don't understand what ails it), or for it to pick a new method/classname to appear in auto-completion results.

I'm not on my work machine now. I don't write C++ as much at my company anymore, as I was pushed into a more (regrettably), so I can't recall an example from the top of my head now. But there were definitely instances where you can pass in something, and it doesn't error until you hit the "build" button (or run a build via cli). And even then, the editor doesn't report where the error is in the "editor area", you have to read the file/line in the console.


I never found a C++ IDE capable of understanding our root CMake project so it can gives us autocompletion and inline errors.

We have a root project that's fully CMake, that orchestrates our sub libraries (also using CMake, declared with ExternalProject_Add) so the dependees are built before their dependents (and also to handle final packaging). The subprojects are added as git submodules.

I tried VSCode and QtCreator but none of them seem to support CMake multi-projects defined in this way. I have to create a build directory per subproject, which can be painful when we have so many subprojects.


> We have a root project that's fully CMake, that orchestrates our sub libraries (also using CMake, declared with ExternalProject_Add)

well, those are not sub-libraries but external projects with their own build-system. I have sublibraries in submodules and add them with add_subdirectory and everything shows and is auto-completed correctly.


Thanks. We've been using external projects since some of them are old style CMake, ripe with global variables, but apparently we could've used add_subdirectory for some other libs. I'll keep that in mind for future refactorings and libraries.


Even if you can't make the IDE work, having a link target that does -fsyntax-only and skip linking should still greatly speed up your compile-edit loop.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: