Dear Alberto,
Do you have a solution for my problem? Herunder are the details of the linker errors:
I have tried using gcc 2.95.3 on Solaris 10 (btw, you are using gcc 2.95.2) and I don't get those errors; in my case, c++ is automatically linking against the libstdc++.so library (from /opt/sfw/gcc-2/lib/gcc-lib/i386-pc-solaris2.10/2.95.3). Try explicitly adding a -lstdc++ switch to the linker....
Alberto
On Tue, 15 Mar 2005 20:12:24 +0100, hakhan <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I am also not able to compile the program the way you suggested.
>
> Here are the details of my error:
>
> mkdir -p /home/xerces-c-src_2_6_0//bin/obj/DOMCount
> c++ -DSOLARIS -fpic -L/usr/lib
> -L/home/xerces-c-src_2_6_0//bin/obj/DOMCount/DOMCount.o -o
> /nfs/dm4-fs59/work/opanstag/dj024/xerces-c-src_2_6_0//bin/DOMCount
> -L/home/xerces-c-src_2_6_0//lib -lxerces-c -lc
> Undefined first referenced
> symbol in file
> ostream::operator<<(unsigned int)
> /home/xerces-c-src_2_6_0//bin/obj/DOMCount/DOMCount.o
> ostream::operator<<(unsigned long)
> /home/xerces-c-src_2_6_0//bin/obj/DOMCount/DOMCount.o
> istream::ios virtual table
> /home/xerces-c-src_2_6_0//bin/obj/DOMCount/DOMCount.o
> fstreambase::close(void)
> /home/xerces-c-src_2_6_0//bin/obj/DOMCount/DOMCount.o
> fstreambase::open(char const *, int,
> int)/home/xerces-c-src_2_6_0//bin/obj/DOMCount/DOMCount.o
> fstreambase::fstreambase(int)
> /home/xerces-c-src_2_6_0//bin/obj/DOMCount/DOMCount.o
> cerr
> /home/xerces-c-src_2_6_0//bin/obj/DOMCount/DOMCount.o
> ifstream::~ifstream(void)
> /home/xerces-c-src_2_6_0//bin/obj/DOMCount/DOMCount.o
> ifstream::ios virtual table
> /home/xerces-c-src_2_6_0//bin/obj/DOMCount/DOMCount.o
> endl(ostream &)
> /home/xerces-c-src_2_6_0//bin/obj/DOMCount/DOMCount.o
> cout
> /home/xerces-c-src_2_6_0//bin/obj/DOMCount/DOMCount.o
> istream::getline(char *, int, char)
> /home/xerces-c-src_2_6_0//bin/obj/DOMCount/DOMCount.o
> ostream::operator<<(char const *)
> /home/xerces-c-src_2_6_0//bin/obj/DOMCount/DOMCount.o
> ostream::operator<<(int)
> /home/xerces-c-src_2_6_0//bin/obj/DOMCount/DOMCount.o
> ios virtual table
> /home/xerces-c-src_2_6_0//bin/obj/DOMCount/DOMCount.o
> ld: fatal: Symbol referencing errors. No output written to
> /home/xerces-c-src_2_6_0//bin/DOMCount
> collect2: ld returned 1 exit status
> gmake: *** [/home/dj024/xerces-c-src_2_6_0//bin/DOMCount] Error 1
>
> The version of the compiler I use is 2.95.2
>
> On Tue, 15 Mar 2005 17:13:34 +0100, Alberto Massari
> <[EMAIL PROTECTED]> wrote:
> > At 16.59 15/03/2005 +0100, hakhan wrote:
> > >Hi,
> > >
> > >I compiled the xerces library with c++ and also compiled one of the
> > >samle programs with c++. After linking the xerces library against the
> > >sample program I kept retrieving the same linker errors. Does it
> > >something to do with namespaces???
> >
> > I can compile a simple sample using
> >
> > c++ -I/home/xml-xerces/c/include -L/home/xml-xerces/c/lib -lxerces-c test.c
> >
> > Could you post the version of the compiler you are using, the command line
> > you run, and the errors you get?
> >
> > Alberto
> >
> >
> > >On Tue, 15 Mar 2005 14:16:40 +0100, Alberto Massari
> > ><[EMAIL PROTECTED]> wrote:
> > > > At 13.59 15/03/2005 +0100, hakhan wrote:
> > > > >Hello,
> > > > >
> > > > >When I want to link my application to the xerces-c library I retrieve
> > > > >unresolved linker errors to to well-known stream objects from the
> > > > >standard c++ library. I compiled xerces-c many times, but somehow I
> > > > >still keep retrieving the same errors. As a platform I use Solaris.
> > > > >Does anyone have an idea?
> > > >
> > > > If you are using gcc, you should try running "c++" instead of "gcc"; if you
> > > > are using Sun's compiler, try running "CC" instead of "cc".
> > > >
> > > > Alberto
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > >---------------------------------------------------------------------
> > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]