Mac Permissions Denied problem

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
 

mfram

macrumors 65816
Jan 23, 2010
1,060
141
San Diego, CA USA
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.