The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 08:33 AM
Basic OS question catwomen HP-UX 4 09-08-2006 08:39 PM
Really basic question.... robherms UNIX for Dummies Questions & Answers 1 02-17-2006 10:50 AM
basic question urwannabefriend UNIX for Dummies Questions & Answers 1 04-10-2004 05:21 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-04-2006
caltiger caltiger is offline
Registered User
  
 

Join Date: Aug 2006
Posts: 8
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
  #2 (permalink)  
Old 09-04-2006
caltiger caltiger is offline
Registered User
  
 

Join Date: Aug 2006
Posts: 8
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
  #3 (permalink)  
Old 09-04-2006
blowtorch's Avatar
blowtorch blowtorch is offline Forum Advisor  
Supporter
  
 

Join Date: Dec 2004
Location: Singapore
Posts: 2,350
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).
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting 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
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:28 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0