You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by bu...@apache.org on 2003/06/25 13:19:09 UTC

DO NOT REPLY [Bug 21079] New: - Unnecessary reference to iostreams library in framework/StdOutFormatTarget.cpp

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21079>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21079

Unnecessary reference to iostreams library in framework/StdOutFormatTarget.cpp

           Summary: Unnecessary reference to iostreams library in
                    framework/StdOutFormatTarget.cpp
           Product: Xerces-C++
           Version: 2.3.0
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Miscellaneous
        AssignedTo: xerces-c-dev@xml.apache.org
        ReportedBy: Gary_Mann@ml.com


Module framework/StdOutFormatTarget.cpp makes use of the iostreams library, 
which to my mind is at odds with the stated aim of sticking to portable, 
platform-independent C++ code. 

The issue is as follows:
If you are using an STL implementation other than that supplied by the compiler 
vendor, as would be the case if you'd purchased RogueWave's SourcePro product 
and were using their STL, and that STL occupies the std namespace, then the 
potential exists for symbol clashes. In particular, if using the Sun Workshop 
compiler (Forte 6), you must use -library=%none,Crun in order to suppress 
linkage to Cstd, the compiler-supplied STL implementation. If you do this, you 
get unresolved externals from libxerces-c.so.23.0. However, if you edit 
StdOutFormatTarget.cpp to remove the references to iostreams, this problem goes 
away. 

It is not possible to use -library=Cstd at the same time as -lstd30-rm (the RW 
SourcePro STL implementation), since then you get symbol clashes with cout, cin 
etc. This is as you would expect.

In my copy of Xerces I have replaced the references to the iostreams library 
with CRTL functions in this module and solved the problem. One last issue - 
despite the fact that Xerces-c makes use of -library=Cstd, it doesn't specify 
it on the link command line, and so it won't pick up libCstd.so automatically. 
If you intend leaving in the references to iostreams, it would be better to 
add -library=Cstd to the link command line, so that when you run ldd on 
libxerces-c.so.23.0, you actually see the requirement for libCstd explicitly.

regards,

Gary

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org