xcode release question

Mac 10.5.4
xCode 3

There seems like there should be an obvious answer to this but I can’t seem to find one. If I’m using cin for input during testapp:setup() where do I enter the input with a Release?

I know while debugging I can run the console to accept input but once I switch to release and try to run the app outside of xCode, it just hangs. Shouldn’t it bring up the terminal or a pseudo console?

As a test I added these lines

  
  
int port;  
cin>>port;  
cout<<"port =  "<<port;  
  

to the setup function in the empty project example and got the same problem. Anyone know?

TL;DR. in blue;

As far as I know, you can’t.

Since it gets packaged as a .app, which the user traditionally double clicks, which opens up a GUI, there is not console associated with that executable.

You could probably open up the terminal.app (Just search for that in spotlight) and then change directory to the inside of the application, something like this:

  
  
cd /Applications/Dictionary.app/Contents/MacOS/  
  

Note that we’ve changed into the .app “package/directory”. Inside that is a few folders, you’re interested in Contents then MacOS. Inside MacOS, you’ll see an actual executable, Dictionary, in our example.

If you now type

  
./Dictionary  

You will see the dictionary app pop up on your dock, BUT you will also be able to type into the console, this input will be fed into Dictionary (but it wont know what to do with it)

Bringing this back to OF, cd into your OF app, and run it via the **./**MyOFApplication
You should now be able to write to the input stream.

Hope that wasn’t too long-winded but I didn’t want to give only half an explanation.

I found that it is possible to start automatically the terminal by double-clicking the executable.

To found the executable we have to go to the terminal and localize the folder where it is

Following the example of **Soup **
instead of

  
cd /Applications/Dictionary.app/Contents/MacOS/  

type _open _instead of _cd _ :

  
open /Applications/Dictionary.app/Contents/MacOS/  

and the folder containing the executable will open
after that you just make an alias of the executable inside of it and move it to the desktop, so you can use it as a double-clickable application

To avoid the blocking effect of cin << I put it in a separate thread.