Hi, It turns out that the shared library was built correctly to use STLPort's iostreams with the configuration and header file change listed below. I just had a stale copy StreamTransform.cpp with some changes in it causing my most recent errors.
So, I'm all set! Thanks so much for the help! Nicole -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 10:14 PM To: xalan-c-users@xml.apache.org Subject: RE: GCC 2.95.3 and stlport-4.5 yield linker errors for StreamTransform sample Hi Terry, This is probably related to what I mentioned in my previous email. I don't see the macro _STLP_NO_OWN_IOSTREAMS being defined anywhere. Did you add it to the command line in the Makefile, or are you trying to use the STLport iostreams? If you are using the STLport iostreams, then something is wrong with how you're buliding, because the istream argument to the XSLTInputSource constructor should be qualified with the STLport namespace ("_STL"). For further diagnosis, you might try looking at the shared library you produced with a binary editor to look for strings containing "XSLTInputSource". You should find the mangled name of the constructor, and you will be able to tell what namespace, if any, the istream argument is in. By the way, the C compiler should be gcc, not g++, although that should not affect the StreamTransform sample. Dave |---------+---------------------------> | | "Terry, Nicole" | | | <[EMAIL PROTECTED]| | | om> | | | | | | 07/07/2003 09:56| | | PM | |---------+---------------------------> >--------------------------------------------------------------------------------------------------------------------------------| | | | To: <xalan-c-users@xml.apache.org> | | cc: (bcc: David N Bertoni/Cambridge/IBM) | | Subject: RE: GCC 2.95.3 and stlport-4.5 yield linker errors for StreamTransform sample | >--------------------------------------------------------------------------------------------------------------------------------| Hi Dave, So far I haven't had much luck with STLPort's iostreams (Xalan 1.5/Linux 2.4.18-14.2a/GCC 2.95.3/STLPort 4.5). It builds libxalan-c1_5_0.so but I'm still getting errors when I try to link the StreamTransform sample (full transcript below): private/DEV.STD.PTHREAD/StreamTransform/StreamTransform.o: In function `_STL::logic_error type_info function': /opt/third-party/pkg/stlport-4.5/include/stlport/stl/_alloc.h:251: undefined reference to `xalanc_1_5::XSLTInputSource::XSLTInputSource(istream *)' /opt/third-party/pkg/stlport-4.5/include/stlport/stl/_alloc.h:251: undefined reference to `xalanc_1_5::XSLTResultTarget::XSLTResultTarget(ostream &)' /opt/third-party/pkg/stlport-4.5/include/stlport/stl/_alloc.h:251: undefined reference to `xalanc_1_5::XSLTInputSource::XSLTInputSource(istream *)' Here's my runConfigure command: ./runConfigure -plinux -cg++ -xg++ -d -rpthread -b32 -z -I/opt/third-party/pkg/stlport-4.5/include/stlport -l -L/opt/third-party/pkg/stlport-4.5/lib -l -lstlport_debug -l -Wl,-Bdynamic -l -Wl,-rpath,:/opt/third-party/pkg/stlport-4.5/lib: I found so far that I needed to comment out one line in Include/GCCDefinitions.hpp #if __GNUC__ < 3 // #define XALAN_CLASSIC_IOSTREAMS #define XALAN_NO_MEMBER_TEMPLATES #define XALAN_NO_STD_ALLOCATORS #define XALAN_NO_USING_DECLARATION #endif Perhaps I need to comment out #define XALAN_NO_STD_ALLOCATORS also? I just want to touch base to make sure I'm walking down the correct path to get this to work. Thank you, Nicole cd /net/nterry.desktop.amazon.com/workplace/nterry/desktop/build/X86_LINUX_GCC2_ GLIBC22/EndoServer/EndoServer-1.6 && env SUNPRO_DEPENDENCIES=/net/nterry.desktop .amazon.com/workplace/nterry/desktop/build/X86_LINUX_GCC2_GLIBC22/EndoServer/End oServer-1.6/private/DEV.STD.PTHREAD/StreamTransform/StreamTransform.o.d /opt/th ird-party/bin/g++ -g -ftemplate-depth-32 -Wall -O2 -mcpu=pentiumpro -D_GNU_SOUR CE -DUSE_STLPORT -pthread -D_PTHREADS -D_UNCAUGHT_EXCEPTION -D__STL_DECLARE_R ANDOM_ACCESS_REVERSE_ITERATORS=_STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS -D BRAZIL_PACKAGE_VERSION=1.6 -I/net/nterry.desktop.amazon.com/workplace/nterry/des ktop/src/appgroup/endo/business/EndoServer -I/net/nterry.desktop.amazon.com/work place/nterry/desktop/src/appgroup/endo/business/EndoServer/build/private/DEV.STD .PTHREAD/idl -I/opt/third-party/pkg/xerces-c-2.2.0/include -I/usr/local/src/xala n-1.5/c/src -isystem /opt/third-party/pkg/stlport-4.5/include/stlport -I/opt/thi rd-party/pkg/icu-2.4/include -I/net/nterry.desktop.amazon.com/workplace/nterry/d esktop/src/appgroup/endo/business/EndoServer -I/net/nterry.desktop.amazon.com/wo rkplace/nterry/desktop/build/X86_LINUX_GCC2_GLIBC22/EndoServer/EndoServer-1.6 /pr ivate/DEV.STD.PTHREAD -I/net/nterry.desktop.amazon.com/workplace/nterry/desktop/ build/X86_LINUX_GCC2_GLIBC22/EndoServer/EndoServer-1.6 /private/DEV.STD.PTHREAD/i dl -I/net/nterry.desktop.amazon.com/workplace/nterry/desktop/src/appgroup/endo/b usiness/EndoServer/build/private/DEV.STD.PTHREAD/idl -o /net/nterry.desktop. amazon.com/workplace/nterry/desktop/build/X86_LINUX_GCC2_GLIBC22/EndoServer/Endo Server-1.6/private/DEV.STD.PTHREAD/StreamTransform/StreamTransform.o -c /net/nte rry.desktop.amazon.com/workplace/nterry/desktop/src/appgroup/endo/business/EndoS erver/StreamTransform/StreamTransform.cpp cd /net/nterry.desktop.amazon.com/workplace/nterry/desktop/build/X86_LINUX_GCC2_ GLIBC22/EndoServer/EndoServer-1.6 && /workplace/brazil-pkg-cache/bootstrap/Braz ilTools/BrazilTools-2.0.0.96/scripts/ld-t-wrap /net/nterry.desktop.amazon.com/wo rkplace/nterry/desktop/build/X86_LINUX_GCC2_GLIBC22/EndoServer/EndoServer-1.6 /bi n/DEV.STD.PTHREAD/stream-test.ldmap /opt/third-party/bin/g++ -L/opt/thi rd-party/pkg/stlport-4.5/lib -Wl,-rpath,:/opt/third-party/pkg/xerces-c-2.2.0/li b:/usr/local/src/xalan-1.5/c/lib:/opt/third-party/pkg/stlport-4.5 /lib:/opt/third -party/pkg/icu-2.4/lib: private/DEV.STD.PTHREAD/StreamTransform/StreamTransform .o -Wl,-Bstatic /opt/third-party/pkg/xerces-c-2.2.0/lib/libxerces-c.so /usr/loca l/src/xalan-1.5/c/lib/libxalan-c1_5_0.so -lstlport_debug -Wl,-Bdynamic -lrt -lp thread -Wl,-Bstatic -Wl,-Bdynamic -lrt -lm -o /net/nterry.desktop.amazon.com/wo rkplace/nterry/desktop/build/X86_LINUX_GCC2_GLIBC22/EndoServer/EndoServer-1.6 /bi n/DEV.STD.PTHREAD/stream-test private/DEV.STD.PTHREAD/StreamTransform/StreamTransform.o: In function `_STL::lo gic_error type_info function': /opt/third-party/pkg/stlport-4.5/include/stlport/stl/_alloc.h:251: undefined ref erence to `xalanc_1_5::XSLTInputSource::XSLTInputSource(istream *)' /opt/third-party/pkg/stlport-4.5/include/stlport/stl/_alloc.h:251: undefined ref erence to `xalanc_1_5::XSLTResultTarget::XSLTResultTarget(ostream &)' /opt/third-party/pkg/stlport-4.5/include/stlport/stl/_alloc.h:251: undefined ref erence to `xalanc_1_5::XSLTInputSource::XSLTInputSource(istream *)' collect2: ld returned 1 exit status Died at /workplace/brazil-pkg-cache/bootstrap/BrazilTools/BrazilTools-2.0.0.96/s cripts/ld-t-wrap line 19. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, June 30, 2003 8:40 AM To: xalan-c-users@xml.apache.org Subject: Re: GCC 2.95.3 and stlport-4.5 yield linker errors for StreamTransform sample > Hi, > When I build the StreamTransform sample for Xalan 1.5 with GCC 2.95.3 (no STLPort), > it works just fine. If I try to build it with STLPort, I get the following linker errors: > private/DEV.STD.PTHREAD/StreamTransform/StreamTransform.o: In function > `_STL::basic_ostream<char, _STL::char_traits<char> > & _STL::endl<char, _STL::char_traits > <char> >(_STL::basic_ostream<char, _STL::char_traits<char> > &)': > /opt/third-party/pkg/xalan-c-1.5 /src/XalanDOM/XalanDOMString.hpp(.text+0xb8): > undefined reference to `xalanc_1_5::XSLTInputSource::XSLTInputSource(_STL::basic_istream<char, > _STL::char_traits<char> > *)' Hi Nicole, This has nothing to do with Xalan itself. You should either configure STLport to use the compiler's native iostream implementation, or build and link with the STLport's version of them. This is explained clearly in the STLport document -- see the configuration macro _STLP_NO_OWN_IOSTREAMS. In the future, please post messages in plain text rather than HTML, as HTML mail is a pain for many of us. Dave