![]() |
|
|
|
|
|||||||
| 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 |
| RPC Programming | emeralddream | High Level Programming | 1 | 02-23-2005 08:34 AM |
| c programming or unix programming!? | moxxx68 | High Level Programming | 1 | 03-30-2004 05:53 AM |
| Programming | CreamHarry | High Level Programming | 3 | 03-07-2002 12:09 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
c programming on vi
i am new in linux environment .I have used vi editor of Unix to get a programe compiled through "gcc ".kindly give me the options to get a program compiled & executed written in c on vi editor.
I want the command to compile a file and the command to get that compiled file executed with any example.
__________________
Rajeev Rai |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
If u try this, it might work
1) Go to Command Mode By pressing ESC 2) Go to Ex Mode by pressing ":" 3) Issue the following command :!gcc % -o <ObjFile> [-l library ] && ObjFile or :!gcc % [-l library ] && a.out -o options lets u create a default object file instead of a.out. The first part of the command lets u compile C Code and the ('&&' ) the second part gets executed only when the first part exits with return status good. If so ,then 'ObjFile' will be created and the shell will execute the Object file else it will show u the errors and exit without executing the 'ObjFile'
__________________
Regards, Satya Prakash Prasad |
|
#3
|
||||
|
||||
|
Thanks for that Prasad. works with g++ also of course
:!g++ % -o output && output |
||||
| Google The UNIX and Linux Forums |