You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by Scott Zhong <Sc...@roguewave.com> on 2008/02/11 22:34:38 UTC

HP-UX link warnings when linking in with -lstd

Hi All,

I had finally found the source of the link warnings: it is occurring
because in the linker we use relative path in the library lookup "-L
<relative path>" which confuses the linker as to which stdcxx library to
use.  This is because the compiler comes with a version of the stdcxx
library: libstd.sl. This might be a compiler bug. I do not know how to
proceed from here, do we do nothing and leave the linker warnings and
submit the bug to HP? do we require absolute pathing to the stdcxx
library? Do we have the user set an environment variable that would
point to the stdcxx library? Any suggestions would help greatly. 

Thanks

Re: HP-UX link warnings when linking in with -lstd

Posted by Martin Sebor <se...@roguewave.com>.
Scott Zhong wrote:
> Hi All,
> 
> I had finally found the source of the link warnings: it is occurring
> because in the linker we use relative path in the library lookup "-L
> <relative path>" which confuses the linker as to which stdcxx library to
> use.  This is because the compiler comes with a version of the stdcxx
> library: libstd.sl. This might be a compiler bug. I do not know how to
> proceed from here, do we do nothing and leave the linker warnings and
> submit the bug to HP? do we require absolute pathing to the stdcxx
> library? Do we have the user set an environment variable that would
> point to the stdcxx library? Any suggestions would help greatly. 

If you think it's a compiler bug we should definitely let HP know
about it. If you put together a small test case that reproduces it
I'll be happy to forward it to HP.

As to how to deal with it, one approach would be for SourcePro to
use the traditional naming convention for the stdcxx library (i.e.,
libstd<built-type>.sl, such as libstd12d.sl) instead of just
libstd.sl.

I don't think using an absolute pathname when linking with libstd
is the way to go (it would assume the lib will always be present
at that location which is unlikely).

Martin