Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Oct 20, 2012, 10:23 AM   #1
ArxFatalis
macrumors newbie
 
Join Date: Oct 2012
Permissions Denied problem

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
ArxFatalis is offline   0 Reply With Quote
Old Oct 20, 2012, 10:26 AM   #2
Dweez
macrumors 6502a
 
Dweez's Avatar
 
Join Date: Jun 2011
Location: Down by the river
Do an "ls -l something.app" and post the results.
__________________
sudo make me a sandwich
Dweez is offline   0 Reply With Quote
Old Oct 20, 2012, 10:29 AM   #3
ArxFatalis
Thread Starter
macrumors newbie
 
Join Date: Oct 2012
-rw-r--r-- 1 myaccount staff 184 20 oct 17:27 testc.app
ArxFatalis is offline   0 Reply With Quote
Old Oct 20, 2012, 10:47 AM   #4
ArxFatalis
Thread Starter
macrumors newbie
 
Join Date: Oct 2012
And also, can you run console apps that was built by Xcode?
ArxFatalis is offline   0 Reply With Quote
Old Oct 20, 2012, 11:04 AM   #5
mfram
macrumors 6502
 
Join Date: Jan 2010
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
mfram is offline   0 Reply With Quote
Old Oct 20, 2012, 11:10 AM   #6
ArxFatalis
Thread Starter
macrumors newbie
 
Join Date: Oct 2012
mfram Thank you! It works now.
ArxFatalis is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 04:39 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

Privacy / DMCA contact / Affiliate and FTC Disclosure
Copyright 2002-2013, MacRumors.com, LLC