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 65816
 
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 6502a
 
Join Date: Jan 2010
Location: 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
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

Similar Threads
thread Thread Starter Forum Replies Last Post
Sharing & Permissions Problem raulG Mac Basics and Help 11 Oct 12, 2013 12:40 PM
Permissions Problem with Virtualbox filmbuff Windows, Linux & Others on the Mac 0 Jul 20, 2013 08:59 PM
SMB Folder Permissions - DENiED! j0ester Windows, Linux & Others on the Mac 0 Feb 11, 2013 11:57 AM
Time Machine Permissions Problem evanavevan OS X 5 Jan 6, 2013 05:24 AM
Resolved: Permissions / Ownership problem Loa OS X 10.8 Mountain Lion 2 Sep 7, 2012 06:20 PM

Forum Jump

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

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

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC