Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > .c programming need help...

.c programming need help...
Thread Tools
wteixeir
Registered User
Join Date: Jan 2003
Status: Offline
Reply With Quote
Jan 20, 2003, 01:11 AM
 
well actually, this is my first time using Developers Tool, so I would like to ask if anyone know what are the procedures that I should take in order to open my .c file program and compile it under Project Builder ????

I've been trying to but unsuccessfully...I can open my .c file but i cannot use anything, besides i dont know which library to pick ... etc...

Does anyone know where can i find that type of info on the net ??

thanks
     
type_r503
Junior Member
Join Date: Oct 2001
Status: Offline
Reply With Quote
Jan 20, 2003, 01:20 AM
 
You need to create a standard tool project. File>New Project...>Standard Tool. Next you can enter your code or add you source file to the project.

Type R
I be that insane n***a from the psycho ward.
     
wteixeir  (op)
Registered User
Join Date: Jan 2003
Status: Offline
Reply With Quote
Jan 20, 2003, 01:34 AM
 
Originally posted by type_r503:
You need to create a standard tool project. File>New Project...>Standard Tool. Next you can enter your code or add you source file to the project.

Type R

Does Project Builder have a COMPILE buttom or something like it, or what should i click just to compile the program ?

Thanks anyway !
     
Chuckit
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Jan 20, 2003, 04:40 AM
 
Originally posted by wteixeir:
Does Project Builder have a COMPILE buttom or something like it, or what should i click just to compile the program ?
Choose Build or click the hammer button in the toolbar.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
yeslekmc
Junior Member
Join Date: Aug 2002
Location: Northeastern NV, USA
Status: Offline
Reply With Quote
Jan 20, 2003, 08:51 PM
 
Originally posted by wteixeir:
Does anyone know where can i find that type of info on the net ??
Check out this link: http://cocoadevcentral.com/articles/000054.php
This is an article called, "Learn C with Project Builder" from the CocoaDev Central web site. It will get you starting using Project Builder to run C programs from just about any textbook. Have fun!
     
wteixeir  (op)
Registered User
Join Date: Jan 2003
Status: Offline
Reply With Quote
Jan 21, 2003, 12:39 AM
 
Originally posted by yeslekmc:
Check out this link: http://cocoadevcentral.com/articles/000054.php
This is an article called, "Learn C with Project Builder" from the CocoaDev Central web site. It will get you starting using Project Builder to run C programs from just about any textbook. Have fun!

After i compile my .c program with gcc on the Terminal, i can simply type for example: "towers 1 2 3" and i would get a result ... does project builder give me this option to test my program inputing different values for my variables after compiling it ????

thanks
     
Chuckit
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Jan 21, 2003, 01:22 AM
 
Originally posted by wteixeir:
After i compile my .c program with gcc on the Terminal, i can simply type for example: "towers 1 2 3" and i would get a result ... does project builder give me this option to test my program inputing different values for my variables after compiling it ????
Sure. Project Builder allows input through the Run panel (the same place it prints the output from your program).

Oh, it occurred to me that you might have meant "towers" to be your executable's name rather than an intended value for a variable. In the case, you can add launch arguments in the Executables tab of the appropriate target.
( Last edited by Chuckit; Jan 21, 2003 at 01:58 AM. )
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
wteixeir  (op)
Registered User
Join Date: Jan 2003
Status: Offline
Reply With Quote
Jan 21, 2003, 08:31 PM
 
Originally posted by Chuckit:
Sure. Project Builder allows input through the Run panel (the same place it prints the output from your program).

Oh, it occurred to me that you might have meant "towers" to be your executable's name rather than an intended value for a variable. In the case, you can add launch arguments in the Executables tab of the appropriate target.
Well yeah, it's my executable file. I still don;t know how to do on the Project Builder the same thing i can do on the Terminal. On the terminal, i just compile the program, and then i can simply type, for example towers 3 1 2, the numbers are needed as inputs. Thats what i want to do with Project builder, but i'm still clueless about it !

thanks
     
Chuckit
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Jan 21, 2003, 09:15 PM
 
Originally posted by wteixeir:
Well yeah, it's my executable file. I still don;t know how to do on the Project Builder the same thing i can do on the Terminal. On the terminal, i just compile the program, and then i can simply type, for example towers 3 1 2, the numbers are needed as inputs. Thats what i want to do with Project builder, but i'm still clueless about it !
Like I said, you can set launch arguments in the Executables section of the appropriate target. For instance, you'd go to towers > Executables > Arguments, click "Add Argument", enter 3 for the argument, click "Add Argument" again, enter 1 for the argument, click "Add Argument" again and enter 2 for the argument. Then you just hit Run or Build & Run and it will run the program with those arguments.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
wteixeir  (op)
Registered User
Join Date: Jan 2003
Status: Offline
Reply With Quote
Jan 21, 2003, 10:45 PM
 
Originally posted by Chuckit:
Like I said, you can set launch arguments in the Executables section of the appropriate target. For instance, you'd go to towers > Executables > Arguments, click "Add Argument", enter 3 for the argument, click "Add Argument" again, enter 1 for the argument, click "Add Argument" again and enter 2 for the argument. Then you just hit Run or Build & Run and it will run the program with those arguments.

Thank you very much, I just got it !
Thanks again
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 08:25 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,