[cc-community] Issue while linking external library with Sun CC

Luis Ibanez luis.ibanez at kitware.com
Fri Apr 24 09:43:08 EDT 2009


Hi Debarshi,

You may have confused this list with a list dedicated
to the Sun-CC (C++) compiler.

This list is dedicated to the Creative Commons community.
http://creativecommons.org/

---

That being said,

You may want to add the flag

                                 "-stlport4"

to your compilation command line so that your
CC compiler use the more standard port of STL.


   Good luck !


        Luis


-------------------------------------------------------------------------------
On Fri, Apr 24, 2009 at 1:00 AM, Debarshi Sanyal
<debarshisanyal at gmail.com> wrote:
> Hi All,
>
> I am trying to link a C++ application with an external dynamic library, say,
> libExtObj.so on SunOS 5.8 using CC.
>
> The link fails stating that some symbols in libExtObj.so cannot be resolved.
> These symbols are all related to STL library like:
>
> Undefined
>   first referenced
>  symbol                             in file
>
> std::basic_string<char,std::char_traits<char>,std::allocator<char>
>>&std::basic_string<char,std::char_traits<char>,std::allocator<char>
>>::operator+=(const char*)                              libExtObj.so
> std::basic_string<char,std::char_traits<char>,std::allocator<char>
>>&std::basic_string<char,std::char_traits<char>,std::allocator<char>
>>::operator+=(const char*)
> unsigned long
> std::basic_string<char,std::char_traits<char>,std::allocator<char>
>>::size()const                 libExtObj.so
>
>
> Normally, CC produces SunWS_cache/ to help it resolve symbols but this is
> not available for external libraries.
>
> I must be missing something.
> Could you please help to solve this issue.
>
>
> --
> Regards,
> Debarshi
>
> _______________________________________________
> cc-community mailing list
> cc-community at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/cc-community
>
>


More information about the cc-community mailing list