Permission denied when running my own prgm in IDE


I’m new to C and this environment, so maybe it’s just me being a noob, but I’ve not been able to run my own programs in IDE after I compile them. The terminal returns

bash: ./add.c: Permission denied

Any ideas?


Run the program without the .c extension. For example: ./add

But ultimately it depends on how you compiled it. If you didn’t specify the output filename, it will default to a.out, in which case you need to run your program as ./a.out.

To specify an executable output name, compile like this: gcc add.c -o add


ok… I tried that, but it still returned the same thing. I have no idea what is going on, so I deleted the workspace, made a new one, and it STILL DOES IT!!!
It worked before… One weird thing I noticed is that it’s automatically compiling or something when the file saves, at least all the letters become colored and the terminal returns “Nothing to be done…” when I try to “make” it. Is it something in the settings?

Thanks so much!


Can you copy-paste a lines from your terminal window that show the compilation command, any output from it, and your command to run the program?



Run your program without the .c extension, like this:


Also, when you run the make command, do it like this:

make add