libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Sun C++ shared library creation failing


From: Albert Chin
Subject: Sun C++ shared library creation failing
Date: Sun, 1 Jun 2003 15:47:42 -0500
User-agent: Mutt/1.4i

On Solaris 9/SPARC with:
  $ CC -v
  CC: Forte Developer 7 C++ 5.4 Patch 111715-06 2003/03/29
  ...
  PASS: tagdemo-conf.test
  FAIL: tagdemo-make.test
  SKIP: tagdemo-exec.test
  PASS: tagdemo-shared.test
  FAIL: tagdemo-make.test
  SKIP: tagdemo-exec.test
  ...

Here's a copy of the error:
  $ sh tagdemo-make.test
  ...
  CC -G -zdefs -nolib -hlibbaz.so.0 -o .libs/libbaz.so.0.0.0
  .libs/baz.o -Qoption ld -z -Qoption ld allextract ./.libs/libfoo.a
  -Qoption ld -z -Qoption ld defaultextract  -lm  
  Undefined                       first referenced
   symbol                             in file
  std::basic_ostream<char,std::char_traits<char> 
>&std::operator<<(std::basic_ostream<char,std::char_traits<char> >&,const 
char*) ./.libs/libfoo.a(foo.o)
  ...

We create a C++ shared library with -nolib which doesn't link in
-lCstd, hence the error above. How do we fix? If -nolib isn't used CC
adds the following libraries by default:
  -lCstd -lCrun -lm -lw -lcx -lc

Is it really wise to use -nolib?

-- 
albert chin (address@hidden)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]