Results 1 to 4 of 4
i compiled my C program by typing:
gcc -o test test.c
then when I want to run the program by typing
test
it says that this command not found
what ...
- 03-29-2005 #1Just Joined!
- Join Date
- Mar 2005
- Location
- France
- Posts
- 2
run a C program
i compiled my C program by typing:
gcc -o test test.c
then when I want to run the program by typing
test
it says that this command not found
what is the problem?
Thanks
- 03-29-2005 #2
try ./test.c
Brilliant Mediocrity - Making Failure Look Good
- 03-29-2005 #3Just Joined!
- Join Date
- Mar 2005
- Location
- France
- Posts
- 2
Thanks for ur reply
it works when i typed in ./test
- 03-30-2005 #4Linux Newbie
- Join Date
- Feb 2005
- Location
- Texas
- Posts
- 168
The " . " stands for the current directory.
Hence, ./test selects the test file in the current directory.
If security isn't an issue, you can add ;. to the end of your path in the .bashrc file in your home directory.
Jeff


Reply With Quote
