469,628 Members | 1,221 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,628 developers. It's quick & easy.

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

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::operator <<
(_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


Jul 22 '05 #1
3 3635
Michel Rosien wrote in news:ch**********@ares.cs.utwente.nl 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::operator <<
(_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/
Jul 22 '05 #2
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
Jul 22 '05 #3
Michel Rosien wrote in news:ch**********@ares.cs.utwente.nl 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/
Jul 22 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Eric | last post: by
6 posts views Thread by nkrisraj | last post: by
3 posts views Thread by nkrisraj | last post: by
2 posts views Thread by Oneironaut | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.