[botan-devel] Sunstudio and undefined symbol

Jeremy C. Reed reed at reedmedia.net
Sat Apr 30 13:54:09 EDT 2011


On Sat, 30 Apr 2011, Jack Lloyd wrote:

> On Fri, Apr 29, 2011 at 09:27:03AM -0500, Jeremy C. Reed wrote:
> > This is with 1.8.11 on SunOS 5.10 Generic_118833-33 sun4u sparc 
> > SUNW,Sun-Fire-V240 using Sunstudio CC: Sun C++ 5.10 SunOS_sparc 
> > 2009/06/03.
> > 
> > $ /usr/bin/CC -g -library=stlport4 -features=tmplife 
> > -features=tmplrefstatic -I/udir/jreed/opt/botan/include -D_XPG4_2 
> > -D__EXTENSION -L/udir/jreed/opt/botan/lib -lbotan -lpthread botantest.cc 
> > -lsocket -lnsl              
> 
> Try -lbotan on the command line after botantest.cc? Sun Studio may not
> collect all the lib link lines after the source files as gcc
> apparently does.


$ /usr/bin/CC -g -library=stlport4 -features=tmplife 
-features=tmplrefstatic -I/udir/jreed/opt/botan/include -D_XPG4_2 
-D__EXTENSION -L/udir/jreed/opt/botan/lib -lpthread botantest.cc -lbotan 
-lsocket -lnsl 
Undefined                       first referenced
 symbol                             in file
Botan::HashFunction*Botan::get_hash(const std::string &) botantest.o
void Botan::LibraryInitializer::initialize(const std::string &) 
botantest.o
ld: fatal: Symbol referencing errors. No output written to a.out



More information about the botan-devel mailing list