![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Carreer:Networking Programming in Unix (C programming Language) | vibhory2j | UNIX for Dummies Questions & Answers | 5 | 09-05-2008 04:57 PM |
| Unix Systems Programming Vs Unix Programming | BCarlson | Shell Programming and Scripting | 0 | 05-24-2006 11:34 AM |
| programming for unix environment | carlvernon | Shell Programming and Scripting | 1 | 04-21-2006 08:05 AM |
| c programming or unix programming!? | moxxx68 | High Level Programming | 1 | 03-30-2004 05:53 AM |
| Java Programming in UNIX Environment | cub | Post Here to Contact Site Administrators and Moderators | 1 | 06-25-2002 05:12 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
New to C Programming in UNIX environment
Hi all,
I know the basics of C programming, but I dont know a single thing about how to write, compile and run C code in UNIX, also where liberaris are stored, how .headers files are being managed in unix, how to debug c code and what are the available GNU tools for c programming in linux env, and what are the advantages of c programming in unix env. Can any body give me the start. Thnx in advance. Cheers, Patras |
| Forum Sponsor | ||
|
|
|
||||
|
Lets see, you can write code in unix with any of the myriad of text editors available - try to familiarise yourself with either the vi or the emacs editors. For compiling code, you can use the GCC (have to install it seperately - though it will usually be available on Linux by default). Many systems come with their native C compilers, like Sun Studio on Sun or HP's HP C compiler.
On almost all systems, the libraries are available under /usr/lib, while includes are under /usr/include. Both libraries and include files specific to a certain products may be installed elsewhere during product installation as well. As for debugging, you can use GDB which is part of the GCC. For more info on GCC, go here. |
|
|||
|
Thanks for your reply. So it means path for header and liberary files is setup in system kernel at the time of installation? Because I never configured any path and compiled my first program with cc today and it went thru.
I dont have gcc installed, is there any major difference btw cc and gcc? Or initially I can continue with cc only. Any documentation is available for cc? I tried to understand the man page but not satisfactory, any good debugger link also pls. thanks in advance. cheers, Patras |
|
||||
|
What OS are you working on? That may tell you what native C compiler you've used. Also, check the output for 'ls -l `which cc`'. (Note the backquotes around 'which'). You may find that cc is actually a link to gcc (quite common). As for the documentation, is it for learning C or learning how to use cc/gcc? For C and debugging links, check the Unix Tutorials/Programming Tutorials/Shell Scripting Tutorials page.
In fact, I think that should answer almost all your questions. And one more piece of advice... check the FAQs page. You will get tutorials, recommended pages, ready-made scripts and more. |
|
|||
|
Thanks for your reply. I'm at SCO Unixware, here is the output of which command:
Code:
$ ls -l `/usr/ucb/which cc` lrwxrwxrwx 1 root sys 15 Apr 16 2002 /usr/bin/cc -> /usr/ccs/bin/cc Thanks for all your help. Cheers, Patras |
|
|||
|
Quote:
Quote:
Quote:
|
|
|||
|
my CC link.
Quote:
On my solaris 9, its: lrwxrwxrwx 1 root other 14 Feb 7 12:03 /opt/SUNWspro/bin/CC -> ../prod/bin/CC |
|||
| Google The UNIX and Linux Forums |