CC (v5.4) linking issue with standard STL

Hi Friends,

We are using CC (v5.4) compiler for our C++ code, which use STL , string, iostream related utility.

Compiler version: CC: Forte Developer 7 C++ 5.4 2002/03/09

We are linking using these options "-lsocket -lnsl -lCstd -lCrun -lm -lc -lposix4 -mt -lpthread"

But we are getting following linking error,

===============

ild: (undefined symbol) __type_1 std::copy<std::deque><unsigned,std::allocator><unsigned> >::const_iterator,std::back_insert_iterator<std::deque><unsigned,st d::allocator><unsigned> > > >(__type_0,__type_0,__type_1) -- referenced in the text segment of /disk1/cbsdev/DIAXL/COMMON/obj/libdiacommon.a(AAASessionPool.o)

ild: (undefined symbol) void __rwstd::__rb_tree<unsigned,std::pair><const unsigned,std::map><unsigned,AAAQualifiedAVP_t,std::less><unsigned&g t;,std::allocator<std::pair><const unsigned,AAAQualifiedAVP_t> > > >,__rwstd::__select1st<std::pair><const unsigned,std::map><unsigned,AAAQualifiedAVP_t,std::less><unsigned&g t;,std::allocator<std::pair><const unsigned,AAAQualifiedAVP_t> > > >,unsigned>,std::less<unsigned>,std::allocator<std::pair>< const unsigned,std::map><unsigned,AAAQualifiedAVP_t,std::less><unsigned&g t;,std::allocator<std::pair><const unsigned,AAAQualifiedAVP_t> > > > > >::__deallocate_buffers() -- referenced in the text segment of /disk1/cbsdev/DIAXL/DIAPARSER/obj/libparser.a(AAARuntimeDictionary.o)

=================================

Do we have to link some other standard library for std::map, or std::deque...like these?

Kind Regards,

Nilanjan

[1659 byte] By [solaris_bitea] at [2007-11-27 10:14:01]
# 1

First of all I recommend to upgrade on Sun Studio 12. It's free and works much more better.

The second hint - please never, never specify -l and/or -I options for standard library explicitly. If you need to tune set of used libraries use -library command line option. Particularly remove lCstd -lCrun and probably corresponded -I options point to std library headers. Compiler knows where to find std headers and std libraries.

If this won't help I would like to see some sort of test case to reproduce the problem.

Atanasyana at 2007-7-28 15:30:38 > top of Java-index,Development Tools,Solaris and Linux Development Tools...