01-20-06 07:50 AM
seema wrote:
> I am new to Unix programming. I am working in HP-UX B.11.23 ia 64 box.
> I have
> aCC 5.55 compiler installed in "/opt/aCC/bin/". But I want to use aCC
> 6.05, so
> I installed aCC 6.05 in "/home/acc6/opt/aCC/bin". Now I want to use
> 6.05 for my
> builds(make) but I dont know how to use 6.05 because if i type,
>
> $which aCC
> /opt/aCC/bin/aCC -> it gives 5.55
>
> And also if i build some thing it takes aCC 5.5 by default.
> Is it possible to use 6.05 for the builds by setting some environment
> variable?
That's what the PATH environment variable is for.
By the way, avoid using "which". It will give wrong answers in certain
cases. Try using "type" instead. (If you are using csh, then which
might be useful.)
Try this:
type aCC
PATH="/home/acc6/opt/aCC/bin:$PATH"
export PATH
type aCC
Alternatively, you can just run the executable directly with its
full path. Just type "/home/acc6/opt/aCC/bin/aCC" instead of "aCC".
- Logan
[ Post a follow-up to this message ]
|