5 ms·
Ask HN: Best dev environment for C in 2024?
Accepting suggestions about anything: IDEs, compilers, editors, editor extensions, etc.
- racenis 2y agoOn Windows I would use Notepad++ and MinGW. On Linux I would use vim and gcc. C is so simple that you don't really need fancy IDE to write it.
- pestatije 2y agoVisual studio
- wizzerking 2y agoNot Xilinx Vitis that is for sure The IDE sucks rocks
- dlcarrier 2y agoI used to thing FPGA development environments were the absolute worst, but then I tried to build a project in Android Studio.
- gregjor 2y agoCan you give more specific criteria than “best?” Visual Studio seems very popular and has everything one needs for writing and debugging C code, but only runs on Windows and costs money. vim + git + gcc + make + gdb another popular set of tools, more portable and free. The “best” environment or set of tools will depend on your skills and patience, and likely on the kind of development you intend: embedded code has different constraints than desktop application code, for example.
- labarilem 2y agoYou're right: it's quite vague. It was intended as "best" for the reader. I'm picking up C again for general SW development after some years of stop, so I'm also wondering what people out there consider the best for their use cases.
- j4nek 2y agoi am still using vim + git + gcc + make
- speedgoose 2y agoI enjoy VSCode/VSCodium, with some vim emulation, because I switch a lot between programming languages and stacks. You can go a long way with VSCode and the right language server. But it’s mostly a matter of personal preferences and you should take the time to test the common environments. Perhaps you like CLion more, or neovim, or Visual Studio Pro on windows. Who knows.
- labarilem 2y agoI'm also using VSCode at the moment. Any extensions you'd recommend?
- gjadi 2y agoEmbedded developer and longtime emacs user here. For code navigation: If the tool chains provides the file compile_commads.json, then I use the built-in LSP: eglot. If not, then universal-ctags to generate TAGS file. For debugging, I use ozone when JTAG is available, if not, back to miserable printf debugging or worse.
- lemonwaterlime 2y agoHere's a couple of tooling posts about modern C development: - https://github.com/xave/modern-c-vim-dev-env https://github.com/xave/modern-c-vim-dev-env - https://github.com/xave/modern-c-vimspector-debugger-tutorial https://github.com/xave/modern-c-vimspector-debugger-tutoria... Otherwise, the suggestions in this thread so far are great.
- triilman 2y agofor terminal editors, I'm using helix I am using doom emacs too. for the runner I want to try "just" instead "make".
- Hashex129542 2y agoI feel XCode is really good for C, C++ programming.
- ostaquet 2y agoThere are plenty of good IDE in 2024 for any languages; C included. For the IDE itself, the big choices are between Jetbrains CLion and VSCode. If you are familiar with Jetbrains product for another language, stick to it. Same for VSCode, if you’re use to it, just install the right plugins. I personally prefer Jetbrains product because it is working without selecting/installing all the plugins. Some people likes to tweak their environment. So, I don’t use a lot of plugins on the IDE. I use VSCode only when I have multiple stack in the same project (typically Flutter project which include the Dart part and the native part). In that case, VSCode is more practical. In the embedded world, there is also Kiel for ARM embedded development. (https://www.keil.com/ https://www.keil.com/). I was never be able to use it. It is really unnatural to me but a lot of embedded C developers love it. Regarding the dev tools, I prefer to use tools that are multi platform and widely used. So, the dev tools include CMake, make and GNU C compiler. It is a pretty common toolkit that covered my needs so far. Unit tests are written with Unity Test Framework (https://github.com/ThrowTheSwitch/Unity https://github.com/ThrowTheSwitch/Unity). It is simple and allow to be executed on the target if required; which is practical for embedded development.