Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

P-Worm

macrumors 68020
Original poster
Jul 16, 2002
2,045
1
Salt Lake City, UT
I was programming in C in Project Builder and eveything is going great. Until I try to run the program. At school, I program in Emacs and everything is a little bit different. In Emacs, when I compile, it makes a new folder and drops the ".c" ending. When I build in Project Builder, I have now Idea where it goes or how to run it. Everything compiled correctly and I don't know what happened. Can someone help?

P-Worm
 
it should drop the file into your home directory
and you can run your program from project builder
 
It actually depends on you settings. Did you start a new project? If so PB will probably have created a directory called the same as your project which will contain all your projects files. After a compile you should see a directory called build in the project directory. Look in their for your app/binary.
 
Yeah I see it. How can I get it to run, like in the Terminal? At school we run everything through the Xterm in their Unix X11 thing.

P-Worm
 
You could use the build and run option, which is both an icon and a menu option.

When you create the project, it does ask you where you want it. Simply take a look at where the project is, and then, you'll find the source files as well the as project file in that folder. The created programme is within in the build folder within the project folder.

I find it easier to:

1) rename the main.c file in PB to something more useful, such as the assignment name.

2) compile from the Terminal application using cc -o MyProg MyProg.c (where MyProg is the name you've given it.)

3) run it with ./MyProg (sometimes, PB won't get the output from the programme properly.)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.