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