Results 1 to 2 of 2
  1. #1

    Member Since
    Mar 28, 2007
    Cool double-click C executable.
    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
    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
    on the command line?

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

    Thanks for help.

  2. #2

    xstep's Avatar
    Member Since
    Jun 25, 2005
    On the road
    2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid
    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Double click now where one would do
    By SleeperSS in forum Apple Desktops
    Replies: 3
    Last Post: 08-16-2014, 07:29 PM
  2. Single Click instead of Double-Click?
    By Calistoga in forum macOS - Operating System
    Replies: 7
    Last Post: 11-06-2011, 07:50 PM
  3. Dock + Long Click / Double Click?
    By jhigga15 in forum macOS - Apps and Games
    Replies: 3
    Last Post: 09-11-2010, 06:29 PM
  4. Left Double Click??
    By Coopers in forum Apple Notebooks
    Replies: 2
    Last Post: 11-12-2009, 06:35 PM
  5. want to double click to maximize
    By soundsystem00 in forum Switcher Hangout
    Replies: 16
    Last Post: 03-25-2008, 09:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts