New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

OS 10.4 - double-click C executable.


Post Reply New Thread Subscribe

 
Thread Tools
alimovz

 
Member Since: Mar 28, 2007
Posts: 1
alimovz is on a distinguished road

alimovz is offline
hey guys.
I don't have a Mac, so I need your help here. If, on Mac OS X, one write some C code, then compiles it with
Code:
gcc -o binaryfile code.c
then puts binaryfile on the Desktop and double-clicks it, what will happen? Will in run as if you typed
Code:
./binaryfile
on the command line?

What if binaryfile doesn't have execute permissions set? What happens whet it gets double clicked?

Thanks for help.
QUOTE Thanks
xstep

 
xstep's Avatar
 
Member Since: Jun 25, 2005
Location: On the road
Posts: 3,231
xstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to all
Mac Specs: 2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid

xstep is offline
From the Finder, it will execute as expected if it has execute permissions set. If Terminal is not open, then it is first opened to the users home directory. Upon exit of the executable, the terminal exits the shell and leaves a message saying "[Process completed]".

If the file does not have execute permission, Terminal is still opened and is left in the users home directory at a live prompt.

When the user is already has the Terminal opened and tries to execute a file without execute permission, the user gets a Permission denied" error.
QUOTE Thanks

Post Reply New Thread Subscribe


« Limiting the width of a JTextArea | Carbon, n00b problem :) »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
My mouse keeps double clicking when i click once. WTF!!! MadSkillzMan Apple Desktops 6 05-13-2010 12:56 PM
Two Finger Double Click on 15" Macbook Pro Bluesmudge Apple Notebooks 5 08-11-2006 12:46 PM
Double Click mouse for Mac Mini Dspg_Asap Schweb's Lounge 3 05-13-2006 04:57 AM
double click on my ibook brendan67 Switcher Hangout 5 06-10-2005 07:28 PM
double click JUMP iNAP Community Suggestions and Feedback 4 06-02-2005 12:11 PM

All times are GMT -4. The time now is 04:03 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?