Clion: Error running 'makefile': Cannot build 'makefile' - c

I have not seen any thread talk about this specific error so here is the problem:
I have set up a C project in Clion and I configured in Setting -> Build,Execution,Deployment -> Toolchains a file usr/bin/make as the Make.
I could run my code yesterday but today, i get the warning in a red window popping-up: Error running 'makefile': Cannot build 'makefile' when I try to run my code.
What could possibly cause this?

It seems like you’re trying to run the makefile instead of the program that is built by it.
Have you tried doing a build first? Or maybe you should try to clean the project too.
Have a look a the blog post of JetBrains https://blog.jetbrains.com/clion/2020/06/makefile-projects-in-clion/. There’s a gif that shows how to clean the project. Hope this helps, if not maybe post your makefile so we can check if it has any errors.

Related

Failed to start GDB

I was trying to debug my project in STM8 STVD today and I got these two error messages.
I've never had this problem and I didn't change anything in this project. Some suggest that I should edit the gdb.ini file but I'm not able to edit it. Also I had no problem to build the code just debugging. Can anyone help?

Clang-format "not available" in VSCode, despite being in /usr/bin

It seems like a simple to solve issue, but I am on and off for several days and cannot make it work. I checked google and here and followed all instructions, but still no success. Here is the problem:
I want to run clang-format on save of my file in VSCode. I installed the Clang-format extension as well as clang-format and clang-format-11 itself. Clang formatting works in the console, the bin is in /usr/bin. However, I setup the vscode extension and know it should work, because I get the error "The '/usr/bin/clang-format-11' is not available". I was like, it should be there, but if I ls /usr/bin inside the VSCode console, it is actually missing. I tried trouble shooting by using the external console and adding the bashrc to vscode using
"terminal.integrated.shellArgs.linux": ["-l"]
but it still doesn't work. Does anyone have any more ideas what I am missing?
I figured after some lengthy research that all files in root belonged to nfsnobody and not me/root. Turned out I installed it from flatpack and didn't pay attention, so basically I was in a sandbox all the time. Maybe it helps someone else.

Run Errors with Eclipse C/C++ IDE

I just installed gcc and Eclipse C/C++ IDE but I'm having trouble using it.
I keep getting these errors. Anyone got ideas on how to fix this?
Your project seems to be one for making a windows application.
The code in your project does not match that, it is the simple code for a console application.
Create a new project, choose "Console Application" and use the same code.
Then you should be able to successfully build your program before you execute it (credits to Some programmer dude, for spotting the "build failed is not run time error").

'A program file was not specified in the launch configuration' on Eclipse Luna CDT (C Project)

So I am new to CDT (even though I have worked with C and Eclipse Java before), and seem to be getting the error as shown in the picture below:
Now, when I check the Run Configurations, the application field of the debug applicaiton seems to be empty, as shown below:
Finally, when I check the actual physical location of where the debug executable should be, the folder seems to be empty, even though I am going through the build process.
Does anyone know why this problem is being caused, and why exactly eclipse isn't building/compiling my executable?
NOTE : I am currently using Eclipse Luna.
It seems that your program doesn't compile correctly, maybe because you have a build error at the compiler level...
Try to press CTRL+B and see if in the problems section you get some errors of the compiler .
If you are familiar with developing Java in Eclipse, then you might have hit a problem that the default setting for Java is to continuously build. However for CDT you need to tell Eclipse to build the project. This can be done by pressing CTRL+B to build all projects in the workspace, or right-clicking on the desired project and selecting Build Project.
Once you have the first build of your project, future builds can be completed automatically by using the Build (if required) before launching option in Window | Preferences | Run/Debug | Launching as shown in this screenshot:
Once you do the first build and set up your launch configuration. Then the edit/debug cycle becomes very efficient, simply code and hit Run or Debug button when ready.

Eclipse nothing to build message in C project

I downloaded Eclipse Mars although I have been doing most of my work on Android Studio. The reason is I need another tool, which is not compatible with Android Studio. The procedures I followed instructed to create an executable C project. I then added hello world to it, but I can an error stating there is nothing to build. What am I doing wrong? All of this is setup on Ubuntu Virtual Machine. I have reviewed the posts online, but the error seems to be specific to each case. Here is a screen capture...
Compiler is simply telling you that your code was already compiled and there are no changes in your code, then it does not compile.
Is a builtin feature of compilers, if there are no changes in source code file, compilers do not waste time.
Clean Project before to Build Project or modify Hello.c and Build your project.

Resources