PB Newbie Help Please...

buc99

Don't Tread on Me!
I've done some programming in some simple scripting languages and have finally decided to learn C.

I can compile easily enough from the command line, but I would like to use PB just so I can keep my files together. How do you use PB to compile a simple "Hello World!" C program? Do I have to use Carbon/Cocoa libraries, or can it just compile plain 'ol basic C source code?

Thanks.
SA
:)
 
I hope you won't feel offended when I point you towards the on-line documentation, but I can really recommend it.

In Project Builder, choose Project Builder Help from the Help menu. The very first page has three tutorial links listed which are all very good and informative. It might take some hours but afterwards you will know everything you need to get started.
 
Been there done that.

These documents deal with cocoa/carbon.

I do not want to mess with this yet since I am still learning C.

I think I may have figured it out though. I have to start with an empty project and a new blank file. I then make the targets and I can build the app. Unfortunately this buries the executable file deep within the executable.app object so I use the debugger on the .app product and it runs the executable file for me.

Thanks.
SA
:)
 
To jump right into the fray with C you can simply create a new project in PB and select "Standard Tool" as the project type. You will immediately have a "Hello World" project suitable for making a command-line program.
 
That was exactly what I was looking for. Thanks Slur.

Just to add some more info:

You can also create an empty project and add a new blank file. Then create a new "tool" target for the file. Either way will work, but if I want to use PB to write many seperate C source files in the same project, I can use the second method after starting with Slur's suggestion. I can then target and build each individual file I'm working on (like if I write many little C programs for practice to see what different things will output).

I think I will use PB more now. I'll save BBedit for my website productions.

Thanks Everyone.
SA
:)
 
Back
Top