I aim programming in C to my course (self-taught) and after did my research I found this IDE: Kdevelop: https://kdevelop.org/
But I struggle because I was last two hours search on the web how figure out to create a simple Hello World and I has a feeling this ide is dead (but maybe I could be wrong - it the most likely). After followed wizard steps to create my project I receive this message when I hit the “execute” button, after did “build” my application: “No valid executable specified”
I have two question to you:
1-Is this the best IDE to a student in C?
2-How can I figure out this issue?
Thank in the advance for any tip and advice.
Some information about my environment:
kdevelop 5.7.211203 (21.12.3)
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Kernel release: 6.2.0-33-generic
It works well for C. Another good IDE is QtCreator, it does more things automatically for you. VSCode is also a popular option. You could probably try GNOME Builder too.
Mind you, I mostly dabble with C++, not C, but most IDEs designed for one should work well with the other.
I think the issue is you might not have specified a target to build.
KDevelop assumes you will be using a build system like CMake or Meson to build your projects. Those are used to create a target. In the case of a hello world, you want an executable target, namely an executable. With more complex projects you can have several targets (executables, libraries, extra components, examples, etc), which is why it matters.
What KDevelop does is:
- search for a CMakeLists.txt / build.ninja file
- configure the project
- see what targets can be built
- build the project
- sets a target to be executed <— manual step
- run the project
When you click on the Execute button for the first time, you should see a window called Launch Settings. Select the project name, click on Add and select the fourth option (the name of your executable). Make sure that the Project Target field is pointing to the right target (the executable name).
Then you click Ok and any subsequent clicks on Execute will build that target, so your executable.
Here’s a tip for you to get started quickly:
You can go to Project → New from template… → Standard → Terminal, and you should see the option to create a simple C or C++ application using CMake or Meson. You’ll get a
main.c file to start coding and a
Edit: oops, I only just noticed you said you followed the wizard to create your C project.