This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [libstdc++/3052] 3.0 unresolved ref to sqrtf



While the problem for the functions with floats has apparently been fixed
with present 3.0.1 CVS, it persists for long double functions. For the
appended small file I get linker errors complaining about missing
functions sqrtl, cosl and sinl.

Fix: probably just like for sqrtf, cosf and sinf.

Regards
  Wolfgang

var/gcc-bugs> cat b.cc
#include <cmath>
int main () {
  long double d;
  std::sqrt(d);
  std::cos(d);
  std::sin(d);
};

var/gcc-bugs> c++ b.cc
/var/tmp/cc0DGVwA.o: In function `std::cos(long double)':
/var/tmp/cc0DGVwA.o(.gnu.linkonce.t._ZSt3cose+0x2c): undefined reference
to `cosl'
/var/tmp/cc0DGVwA.o: In function `std::sin(long double)':
/var/tmp/cc0DGVwA.o(.gnu.linkonce.t._ZSt3sine+0x2c): undefined reference
to `sinl'
/var/tmp/cc0DGVwA.o: In function `std::sqrt(long double)':
/var/tmp/cc0DGVwA.o(.gnu.linkonce.t._ZSt4sqrte+0xb8): undefined reference
to `sqrtl'
collect2: ld returned 1 exit status

var/gcc-bugs> c++ -v
Reading specs from
/home/people/wolf/Config/sparc-sun-solaris2.7/gcc-ss/lib/gcc-lib/sparc-sun-solaris2.7/3.0.1/specs
Configured with: ../gcc/configure
--prefix=/home/people/wolf/Config/sparc-sun-solaris2.7/gcc-ss
--with-gnu-ld --with-gnu-as --with-ld=/usr/local/bin/ld
--with-as=/usr/local/bin/as
Thread model: posix
gcc version 3.0.1 20010710 (prerelease)


-------------------------------------------------------------------------
Wolfgang Bangerth          email: wolfgang.bangerth@iwr.uni-heidelberg.de
                             www: http://gaia.iwr.uni-heidelberg.de/~wolf



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]