I am running 4.23A. I installed Watcom C 9.52. I wrote a simple C code,
called it hi.c, and compiled it with " cc -o hi hi.c". I try to run the
executable by typing hi, and I get the message "hi: not found ". “hi” is in
the current directory. I can’t run scripts anymore either. Can any one
please give me any input on what’s wrong.
thanks,
Doron
doron@cfi.ucsb.edu
If you are logged in as root, root does NOT by default look in the current
directory. Look at your $PATH for either
:: (a null directory entry) or :.: (a single dot) either would mean look in
the current directory. If neither are present then the current directory
will NOT be checked.
To execute a program in the current directory you can type:
./myProgram
The “./” specifically says look in the current directory.
P.S. Don’t ever call a program “test”.
Doron Halevi <doron@cfi.ucsb.edu> wrote in message
news:95q4uu$n3f$1@inn.qnx.com…
I am running 4.23A. I installed Watcom C 9.52. I wrote a simple C code,
called it hi.c, and compiled it with " cc -o hi hi.c". I try to run the
executable by typing hi, and I get the message "hi: not found ". “hi” is
in
the current directory. I can’t run scripts anymore either. Can any one
please give me any input on what’s wrong.
thanks,
Doron
doron@cfi.ucsb.edu
“Bill at Sierra Design” <BC@SierraDesign.com> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ
ÓÌÅÄÕÀÝÅÅ: news:95q74l$oac$1@inn.qnx.com…
[snip]
P.S. Don’t ever call a program “test”.
This is the BEST advice I have ever heard !!!
))
Bill at Sierra Design wrote:
P.S. Don’t ever call a program “test”.
Hey,
some of my best programs ever wrote were called test.
Only for marketing they were renamed ![:wink: :wink:](/images/emoji/twitter/wink.png?v=9)
Friedhelm Schuetz
Friedhelm Schuetz <Friedhelm.Schuetz@kleinknecht.de> wrote:
Bill at Sierra Design wrote:
snip
P.S. Don’t ever call a program “test”.
snap
Hey,
some of my best programs ever wrote were called test.
Only for marketing they were renamed > ![:wink: :wink:](/images/emoji/twitter/wink.png?v=9)
Ok, only call a program “test” if you know what you are doing. Calling
your “hello world” program “test”…
cc -o test test.c
test
Oops… nothing got printed… and then you start trying to fix your
test.c, which, of course, isn’t the problem.
-David
QNX Training Services
dagibbs@qnx.com
We’ve all been bitten by it. Right? (My hand is raised)
Oleg Mityagin <mityagin@rlt.ru> wrote in message
news:95qqov$56f$1@inn.qnx.com…
“Bill at Sierra Design” <> BC@SierraDesign.com> > ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ
ÓÌÅÄÕÀÝÅÅ: news:95q74l$oac$> 1@inn.qnx.com> …
[snip]
P.S. Don’t ever call a program “test”.
This is the BEST advice I have ever heard !!! >
> ))
The problem here is that “test” is a shell builtin command. If you type
test all by itself, you won’t be running your program. You’ll be running
the shell builtin.
Friedhelm Schuetz <Friedhelm.Schuetz@kleinknecht.de> wrote in message
news:3A814D49.428659F@kleinknecht.de…
Bill at Sierra Design wrote:
snip
P.S. Don’t ever call a program “test”.
snap
Hey,
some of my best programs ever wrote were called test.
Only for marketing they were renamed > ![:wink: :wink:](/images/emoji/twitter/wink.png?v=9)
Friedhelm Schuetz
Not me. I learned from my colleagues’ mistake ![:slight_smile: :slight_smile:](/images/emoji/twitter/slight_smile.png?v=9)
They once wrote a test program in QNX2 called “p”. (I can’t remember
what the QNX2 p does, though…)
Bill at Sierra Design wrote:
We’ve all been bitten by it. Right? (My hand is raised)
Oleg Mityagin <> mityagin@rlt.ru> > wrote in message
news:95qqov$56f$> 1@inn.qnx.com> …
“Bill at Sierra Design” <> BC@SierraDesign.com> > ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ
ÓÌÅÄÕÀÝÅÅ: news:95q74l$oac$> 1@inn.qnx.com> …
[snip]
P.S. Don’t ever call a program “test”.
This is the BEST advice I have ever heard !!! >
> ))