# coding in c on mac



## shail84 (Oct 12, 2006)

Hey!

I just bought a MacBook version 10.4.8

I need to carry out socket programming related to a client-server architecture in C.

I have previously used Turbo C++ on Windows to code in C.

Can I code in C on MAC?

I have no idea how to go about it so I need to know everything form A to Z.

Would really appreciate any help on this.

Thanks!


----------



## nixgeek (Oct 12, 2006)

You should be able to if you install the Developer Tools that are available on one of the discs that came with your MacBook.  Xcode and GCC compilers, along with other development frameworks are available in the Developer Tools.


----------



## shail84 (Oct 12, 2006)

hey!

I have already installed all the developer tools that came with the installation cd.

what next?

as in, where do i code? how do i compile? how do i run?

sorry but I'm really new to this platform and havent the slightest idea!!

help me out......thanks!!


----------



## ElDiabloConCaca (Oct 13, 2006)

You can edit, compile and run on the command line (in Terminal) just like any other UNIX/Linux box -- use gcc or cc to compile, then "./(binary name)" to run.

You can also use the XCode development environment to code, build and run -- if you've ever used another IDE, you'll have no problem picking up XCode in a snap.  It's located in /Developer/Applications I believe.


----------



## szymczyk (Oct 13, 2006)

I have an article on my book's site that walks you through creating your first Xcode project. The article creates a C++ command-line program, but you can use the article to create a C command-line program. Create a Standard Tool project instead of a C++ Tool project.


----------

