|
|
Xcode: Command Line Interface Gone? :-o
|
|
|
|
Mac Enthusiast
Join Date: Feb 2003
Location: Portland, Oregon
Status:
Offline
|
|
In PB, I was able to write my command-line C / C++ programs and hit command-R to compile and then run them. When ran, an I/O interface would appear, but in Xcode, no such luck. Any ideas of what's going on here? Does Xcode no longer support command-line I/O?
jesse ;-)
|
|
|
|
|
|
|
|
|
Junior Member
Join Date: Jan 2003
Status:
Offline
|
|
Works for me, I see the same style run window with the standard output and error of the program running. Just select new projet and "standard tool" and build it, the default program prints hello world.
|
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Feb 2003
Location: Portland, Oregon
Status:
Offline
|
|
Try this:
#include <stdio.h>
int main ()
{
int i;
printf( "Enter a number\n" );
scanf( "%d", &i );
return 0;
}
Doesn't do anything. If I hit the carriage return, than the message "Enter a number" prints and then it returns 0. In PB, the message "Enter a number" would print, then it would accept an integer, then it would return 0.
Is this not the same behavior you're getting?
jesse ;-)
|
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Apr 2001
Location: Seattle, WA
Status:
Offline
|
|
I've had that problem in PB before... i don't think it's an XCode-specific problem. my solution: go code simple stuff in simple applications! open a terminal, navigate to your file, and type g++ foo.cpp. that'll compile.
type ./a.out to run. up arrrow will return your prev command, so you can change your code, save it, then up twice to compile, up twice more to run I don't remember ever finding a better way about the problem, other than feeding it all it's input before it prompts for it...
edit: in fact just ran that code in PB(december build), and it did the same thing...
Code:
4
Enter a number
testing has exited with status 0.
time to start gripin' to apple looks like...
|
The short shall inherit the earth. Just you wait. You won't see us coming. We'll pop out from under tables, beds, and closets in hordes. So you're tall, huh? You won't be so tall when I chew off your ankles. Mofo
|
|
|
|
|
|
|
|
Junior Member
Join Date: Apr 2001
Status:
Offline
|
|
I am having a similar problem with Xcode. I am trying to build and run a simple java tool, yet I keep getting a weird error. When I open the project as a .pbproj it works fine, but not when I open it as a .xcode
here is the run log...
java.util.zip.ZipException: No such file or directory
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:112)
at java.util.jar.JarFile.<init>(JarFile.java:117)
at java.util.jar.JarFile.<init>(JarFile.java:55)
Exception in thread "main"
java has exited with status 1.
Any ideas?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|