Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > What to do with a linker warning about a public symbol from the STL library defined in two modules?

Reply
Thread Tools

What to do with a linker warning about a public symbol from the STL library defined in two modules?

 
 
Michel Rosien
Guest
Posts: n/a
 
      09-10-2004
Hello All,

I'm getting the following linker warning: (I'm using Borland C++ Builder 6)

[Linker Warning] Public symbol '_STL::basic_ostream<char,
_STL::char_traits<char> >& _STL:perator <<
(_STL::basic_ostream<char, _STL::char_traits<char> >&, const signed char *)'
defined in both module
C:\ROSIEN\MONTIUM\SIMULATOR\MONTIUMSIMUTILITY.OBJ and
C:\ROSIEN\HIGH2\BASICSIMULATOR.OBJ

I don't understand why this is happening. Obviously this is not a symbol I
have defined, it is an STL function.
I know I am including <iostream> and other STL header files in a lot of my
..cpp files but that shouldn't be a
problem I think?

Does anybody know what might be the cause of such a warning and how I could
fix it?
And is it safe to ignore such a warning? The program seems to run fine.

--Michel








 
Reply With Quote
 
 
 
 
Rob Williscroft
Guest
Posts: n/a
 
      09-10-2004
Michel Rosien wrote in news:chs4gt$r4v$(E-Mail Removed) in
comp.lang.c++:

> Hello All,
>
> I'm getting the following linker warning: (I'm using Borland C++
> Builder 6)
>
> [Linker Warning] Public symbol '_STL::basic_ostream<char,
> _STL::char_traits<char> >& _STL:perator <<
> (_STL::basic_ostream<char, _STL::char_traits<char> >&, const signed
> char *)' defined in both module
> C:\ROSIEN\MONTIUM\SIMULATOR\MONTIUMSIMUTILITY.OBJ and
> C:\ROSIEN\HIGH2\BASICSIMULATOR.OBJ
>
> I don't understand why this is happening. Obviously this is not a
> symbol I have defined, it is an STL function.
> I know I am including <iostream> and other STL header files in a lot
> of my .cpp files but that shouldn't be a
> problem I think?
>
> Does anybody know what might be the cause of such a warning and how I
> could fix it?
> And is it safe to ignore such a warning? The program seems to run
> fine.
>


It should be, you are runing your compiler in a non-standard mode,
not a difficult thing with CBuilder BTW.

It should be *merging* duplicates of this template function, but it
isn't (at least not without issuing the warning).

Check the help pages, and build option's (if your using the IDE),
look for option's related to template's, instantiation and merging,
check out warning related option's too.

To get better advice than this goto a borland newsgroup, they have names
starting with borland.public.*, you may want one of the ones in the
borland.public.cppbuilder.* hierarchy.

HTH.

Rob.
--
http://www.victim-prime.dsl.pipex.com/
 
Reply With Quote
 
 
 
 
Michel Rosien
Guest
Posts: n/a
 
      09-10-2004
Thanks for the help

> It should be, you are runing your compiler in a non-standard mode,
> not a difficult thing with CBuilder BTW.


I'm not sure what you mean here. It is running in default mode.

> It should be *merging* duplicates of this template function, but it
> isn't (at least not without issuing the warning).


So you say that the warning is not caused by some error of mine
and it should not issue the warning?

> To get better advice than this goto a borland newsgroup, they have names
> starting with borland.public.*, you may want one of the ones in the
> borland.public.cppbuilder.* hierarchy.


I'll look there

--Michel


 
Reply With Quote
 
Rob Williscroft
Guest
Posts: n/a
 
      09-10-2004
Michel Rosien wrote in news:chsfqp$dfh$(E-Mail Removed) in
comp.lang.c++:

> Thanks for the help
>
>> It should be, you are runing your compiler in a non-standard mode,
>> not a difficult thing with CBuilder BTW.

>
> I'm not sure what you mean here. It is running in default mode.


Indeed, default mode != Standard conforming.

>> It should be *merging* duplicates of this template function, but it
>> isn't (at least not without issuing the warning).

>
> So you say that the warning is not caused by some error of mine
> and it should not issue the warning?


Yup.


Rob.
--
http://www.victim-prime.dsl.pipex.com/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
microsoft.public.certification, microsoft.public.cert.exam.mcsa, microsoft.public.cert.exam.mcad, microsoft.public.cert.exam.mcse, microsoft.public.cert.exam.mcsd loyola MCSE 4 11-15-2006 02:40 AM
microsoft.public.certification, microsoft.public.cert.exam.mcsa, microsoft.public.cert.exam.mcad, microsoft.public.cert.exam.mcse, microsoft.public.cert.exam.mcsd loyola Microsoft Certification 3 11-14-2006 05:18 PM
microsoft.public.certification, microsoft.public.cert.exam.mcsa, microsoft.public.cert.exam.mcad, microsoft.public.cert.exam.mcse, microsoft.public.cert.exam.mcsd loyola MCSD 3 11-14-2006 05:18 PM
microsoft.public.certification, microsoft.public.cert.exam.mcsa, microsoft.public.cert.exam.mcad, microsoft.public.cert.exam.mcse, microsoft.public.cert.exam.mcsd realexxams@yahoo.com Microsoft Certification 0 05-10-2006 02:35 PM
microsoft.public.dotnet.faqs,microsoft.public.dotnet.framework,microsoft.public.dotnet.framework.windowsforms,microsoft.public.dotnet.general,microsoft.public.dotnet.languages.vb Charles A. Lackman ASP .Net 1 12-08-2004 07:08 PM



Advertisments