The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM


High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Basic MD5 Question t4st33@mac.com Filesystems, Disks and Memory 2 01-16-2008 04:33 AM
Basic OS question catwomen HP-UX 4 09-08-2006 05:39 PM
Really basic question.... robherms UNIX for Dummies Questions & Answers 1 02-17-2006 06:50 AM
basic question urwannabefriend UNIX for Dummies Questions & Answers 1 04-10-2004 02:21 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-04-2006
Registered User
 

Join Date: Aug 2006
Posts: 8
Stumble this Post!
a very basic question regarding gcc...

hi,
as the topic says.. i`m a newbie to the unix platform.. plz help me out here.
i create a .c file using "vi prog.c"
then write the code in it... then save n exit..
wat happend after tht.. ?? how do i compile n check the program???? i`ve been thru the manual pages of gcc but i cudn`t get anything.. anything i shud know specifically..?

thanx
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 09-04-2006
Registered User
 

Join Date: Aug 2006
Posts: 8
Stumble this Post!
Talking

hi,
ok ..got the respobnse to my question.. i had to use "./" b4 the output filename... fine.. now one more other doubt...

we have to run the output file using ./a.out (where a.out is the compiled, n linked file) .. now how can i run a.out without using "./" b4 the filename???

thanx
Reply With Quote
  #3 (permalink)  
Old 09-04-2006
blowtorch's Avatar
Supporter
 
Join Date: Dec 2004
Location: Singapore
Posts: 2,325
Stumble this Post!
For that you have to include the pwd in the path. You can do that by running
Code:
PATH=$PATH:.; export PATH
in the sh/ksh/bash family of shells. Remember though, this is considered to be very insecure (especially if you are running as root).
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 02:06 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0