LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-19-2004, 06:43 PM   #1
ucsb_andrew
LQ Newbie
 
Registered: Feb 2004
Posts: 2

Rep: Reputation: 0
Can't execute outfiles


Im using rh9 and when i compile programs with both g++ i cannot execute the outfiles afterward, i.e.
$ g++ -o vacation vacation.cpp
it compiles fine and produces a vacation outfile.
When i try to run vacation it tells me vacation is not a command
$ vacation
bash: vacation: not a command

I know that the program itself works since i can run it on my school rh9 and fedora core.
I am curious if there is anything i need to do to make the executables run.

Thanks
 
Old 02-19-2004, 07:06 PM   #2
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 60
well i am not sure why you would have to if you are in the folder that it exists in, but did you try typing :
./vacation
?
 
Old 02-20-2004, 01:53 AM   #3
jhorvath
Member
 
Registered: Sep 2002
Location: OH, USA
Distribution: 2.6.16-1.2096_FC5 #1
Posts: 245

Rep: Reputation: 30
by default (on my slack system)..if you're root, the current directoy is not in the search path. standard users should generally contain '.' in the search path tho...

you can create a ~/.bash_profile, ~/.bash_login or a ~/.profile with the contents of

Code:
#!/bin/sh

PATH=$PATH:.
export PATH
..incase you don't feel like specifying the current directory everytime..

--jeremy
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
tar: cannot execute ben_dsr Linux - Newbie 7 10-10-2004 04:08 PM
Cannot execute '/etc/rc.S' jmartinph Slackware 2 03-15-2004 01:39 AM
execute sript? cloids Linux - Software 1 01-15-2004 01:03 PM
cronjob will not execute. the_rydster Linux - Newbie 3 11-20-2003 03:34 PM
g++ how do i execute? neon Linux - Newbie 5 08-14-2003 03:51 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration