This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: bootstrap/4037: Can't link C++ programs to Sun's libsunmath(regression vs. 2.95)
- From: Wolfgang Bangerth <wolfgang dot bangerth at iwr dot uni-heidelberg dot de>
- To: rodrigc at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
- Date: Mon, 25 Feb 2002 16:58:19 +0100 (MET)
- Subject: Re: bootstrap/4037: Can't link C++ programs to Sun's libsunmath(regression vs. 2.95)
> Synopsis: Can't link C++ programs to Sun's libsunmath (regression vs. 2.95)
>
> State-Changed-From-To: open->closed
> State-Changed-By: rodrigc
> State-Changed-When: Sun Feb 24 07:32:10 2002
> State-Changed-Why:
> Those symbols are not defined in libsunmath.so.
>
> nm libsunmath.so | grep cos
>
> U __cos
>
> They are defined in libm.so, so you need to add:
> -libm -libsunmath
>
> to your link line.
For whatever reason, I did not need to link with libm with gcc2.95. The
problem has nevertheless gone away somehow, and I can again link as
previously, i.e. without -lm and everything works. Thanks anyway,
regards
Wolfgang
-------------------------------------------------------------------------
Wolfgang Bangerth email: wolfgang.bangerth@iwr.uni-heidelberg.de
www: http://gaia.iwr.uni-heidelberg.de/~wolf