[cc-community] Issue while linking external library with Sun CC
Debarshi Sanyal
debarshisanyal at gmail.com
Fri Apr 24 11:26:30 EDT 2009
Hi Luis,
Thanks for your response but that doesn't seem to work.
If I write:
CC -mt -xarch=v9 -xO3 -fns=no -stlport4 a.cpp -lextObj -o myOutput
CC: Warning: Option -stlport4 passed to ld, if ld is invoked, ignored
otherwise
ld: fatal: library -lport4: not found
Could you please help? Also could you please let me know the name of mailing
list dedicated
to the Sun-CC (C++) compiler?
Thanks,
Debarshi
On Fri, Apr 24, 2009 at 7:13 PM, Luis Ibanez <luis.ibanez at kitware.com>wrote:
> 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
> >
> >
> _______________________________________________
> cc-community mailing list
> cc-community at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/cc-community
>
--
Regards,
Debarshi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ibiblio.org/pipermail/cc-community/attachments/20090424/25157e2a/attachment.htm
More information about the cc-community
mailing list