Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ArxFatalis

macrumors newbie
Original poster
Oct 20, 2012
4
0
Hi there!
I started to learn C. When i compile some programs from K&R C programming language via gcc -c something.c -o something.app, it is ok. But when I'm trying to run it via open ./something app it shows me permission denied. Is there some solution to fix this?
Thanks!
P.S. Im noob in terminal so it may be my error.
P.S.S. Excuse me for my bad English
 
The '-c' parameter only compiles the .c file into an object file. Not something you can execute. It's intended for .c files that don't contain a main() function. Does that file contain a main() function? If so, you shouldn't be using the '-c' parameter.

Just:

gcc something.c -o something.app
./something.app
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.