LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Can't execute outfiles (https://www.linuxquestions.org/questions/programming-9/cant-execute-outfiles-148198/)

ucsb_andrew 02-19-2004 06:43 PM

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

DrOzz 02-19-2004 07:06 PM

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
?

jhorvath 02-20-2004 01:53 AM

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


All times are GMT -5. The time now is 12:23 PM.