473,324 Members | 2,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

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 3863
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jim | last post by:
All, I'm trying to debug a Python GPF while running a script that we've written. After fixing up some of the paths for the Python build and successfully building Python from ActiveState source,...
4
by: Eric | last post by:
Hello I receive (only in Release build) the following linker warning: LINK : warning LNK4089: all references to 'WS2_32.dll' discarded by /OPT:REF If I set WS2_32.lib in project properties...
4
by: Old Wolf | last post by:
I have the following code. One one compiler it compiles OK, on the other it gives the two warnings shown below, and then the linker fails because Foo<int>::str is undefined. Which is correct? ...
3
by: Chucker | last post by:
Hi Folks, I got a Wrapper Dll around a native C++ static library. In .NET 1.1 this worked fine. When moving to .NET 2.0 I get a couple of unresolved externals / linker errors: Error 16 error...
6
by: nkrisraj | last post by:
Hi, I defined a simple method, getRecsize() inside one of the classes, Class RateRec as shown below. class RateRec { public: size_t getRecSize(void) const; ......
3
by: nkrisraj | last post by:
Hi, I defined a simple method, getRecsize() inside one of the classes, Class RateRec as shown below. class RateRec { public: size_t getRecSize(void) const; ......
2
by: dasilva109 | last post by:
Hi guys I am new to C++ and need urgent help with this part of my code for a uni coursework I have to submit by Thursday //ClientData.h #ifndef CLIENTDATA_H #define CLIENTDATA_H #include...
2
by: Oneironaut | last post by:
Hello friends, I have an issue with a linker warning. It is the warning LNK4089. I am working in MSVC6.0 I investigated and this warning tells that the import of the library to which it makes...
1
by: dewi | last post by:
Dear All, I am trying to compile a C code using Visual C++. Can anyone explain how to solve it? Thank You. #include <math.h> #include <string.h> #include "RV2AJFRONT_NEW.h" #include...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.