• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
executable iostream in terminal when double-clicking app icon
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

executable iostream in terminal when double-clicking app icon


  • Subject: executable iostream in terminal when double-clicking app icon
  • From: "Tom O'Grady" <email@hidden>
  • Date: Tue, 20 Mar 2007 11:38:52 -0000

 
hi there,
i was wondering whether anybody could help me with a problem i'm having - searching through the lists hasn't provided an answer to this yet.
 
i have a carbon application target, which creates a command line executable (in the usual 'MacOS' folder of the bundle). i wanted an application structure so that the user can double-click the .app icon and run the executable without having to worry about the contents. in fact there are several binaries that i am currently copying to the 'resources' directory in the bundle, which are used by the executable.
 
in debug, the iostream is displayed in the Debugger Console. if i 'build and run' in debug for xcode, it launches in terminal (which i know is specified under 'debugging' under 'get info' for the executable). If i build the application, show the package contents, navigate to 'MacOS' and double-click the executable, it still launches in Terminal just as i wanted.
however, double-clicking on the .app icon itself causes it to launch invisibly (there's no .nib file for it to load), and instead of sending std::cin / cout to the Terminal, it writes to the console.log.
 
is there any way of reliably routing the std::cin / std::cout to Terminal (the program requires some options to be input by the user as well as displaying info), so i can retain the application / bundle structure and allow the user to double-click the app icon and launch the program straight away in terminal?
 
thanks,
tom
-------------------------
CEDAR Audio Ltd
20 Home End
Fulbourn
Cambridge
CB21 5BS
UK
 
Tel: +44 1223 881771
Fax: +44 1223 881778
Web: www.cedaraudio.com
 
Registered in England and Wales, No. 2855599
VAT No. UK493 3645 20
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: executable iostream in terminal when double-clicking app icon
      • From: alex <email@hidden>
  • Prev by Date: Re: How do I sample kernel_task?
  • Next by Date: Xcode keeps finding wrong files
  • Previous by thread: Re: How do I sample kernel_task?
  • Next by thread: Re: executable iostream in terminal when double-clicking app icon
  • Index(es):
    • Date
    • Thread