You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Way, Janet" <JW...@dynasty.com> on 2000/05/18 15:01:07 UTC
RE: Xalan port to HPUX11 - iostream-- thanks
Thanks for the responses. I went with
something like this.
-----Original Message-----
From: Martin.Klang@yellowpages.co.uk
[mailto:Martin.Klang@yellowpages.co.uk]
Sent: Thursday, May 18, 2000 7:10 AM
To: xalan-dev@xml.apache.org
Subject: RE: Xalan port to HPUX11 - iostream
Contact: Tel: 0118 950 6435 - New Media Systems, 1st Floor South, Queens
Walk
In general, the <iostream> style include is the newer, namespaced way of
using
std libs - it should put everything in the std:: namespace - as opposed to
<iostream.h> that normally shouldn't.
So if you're missing 'iostream' and want to create it from 'iostream.h', as
Patrick suggested, you should consider doing something like:
#ifndef __IOSTREAM__
#define __IOSTREAM__
namespace std {
#include <iostream.h>
}
#endif // __IOSTREAM__
(though make sure you don't use the same headerguard, ie '__IOSTREAM__' as
in
your iostream.h!)
I seem to remember from the HP-UX c++ compiler (aCC is it?) that it supports
namespaces in general, but not 'std'... maybe this has changed now -
otherwise
you're going to have similar problems with all std include files.
you might find you've got different versions of c++ headers installed with
aCC,
both ansi and RougeWave - see if there's something like
/opt/aCC/include/ansi or
/opt/aCC/include/rouge
and there's probably a symlink for 'std' pointing to one of them. Have a
look at
the different include files - you could always try changing library
implementation.
Unfortunately I'm not familiar with the Xalan C++ sauce, and I've currently
not
access to HP-UX, otherwise I might have been of more help...
All I can remember really is that I had some issues when compiling
Gnu/opensource stuff on HP-UX11.00 using aCC - many of them related to the
'standard' (ha!) libraries and include files.
Not very encouraging maybe... but gcc/g++ sits nicely on HP-UX, and you can
get
it pre-built from HP's shareware distribution site (can't remember the URL,
though I'll dig it out if you want). That will get you decent c++libs as
well.
Won't work if you have to link aCC-built code against Xalan though...
/martin
To: xalan-dev@xml.apache.org
cc: (bcc: Martin Klang/YellowPages)
From: Patrick Glur <gl...@Nagra.com>, 18 May 2000, 8:21 a.m.
RE: Xalan port to HPUX11 - iostream
Hi,
I have had the same kind of problem when I was porting Xalan C++ v0.30.0 on
Compaq Tru64 Unix (Previously DEC Unix or OSF1) with the compiler cxx v6.2.
The problem was with <cassert>, <climits>, <cstdio>, etc ..
There is three alternatives to solve the problem:
1) Include <iostream.h> instead of <iostream>
2) Same but with conditional include like that
#if defined(__GNUC__)
#include <iostream>
#elif defined(__DECCXX)
#include <iostream.h>
#endif
The __DECCXX is defined when I compile with cxx on DEC.
You could do the same for HPUX11. You have just to find out what should
replace __DECCXX.
3) You can write a new file in the xalan/src named iostream. This file
should have the following content:
#ifndef __IOSTREAM__
#define __IOSTREAM__
#include <iostream.h>
#endif // __IOSTREAM__
This is the solution I have provisionaly choosen. It allows to change
nothing in all the source and to make the compilation works fine.
Remark:
You can customize the compilation for your platform like that:
#if defined(_MSC_VER)
#include "VCPPDefinitions.hpp"
#elif defined(__GNUC__)
#include "GCCDefinitions.hpp"
#elif defined(__DECCXX)
#include "DECCXXDefinitions.hpp"
#endif
The DECCXXDefinitions.hpp is a new file derived from GCCDefinitions.hpp and
adapted for the DEC platform.
You could do the same for HPUX11.
Regards,
Patrick Glur
Tel: ++41.21.732.05.05
Fax: ++41.21.732.01.00
E-mail : glur@nagra-kudelski.ch
> -----Original Message-----
> From: David_N_Bertoni@lotus.com [mailto:David_N_Bertoni@lotus.com]
> Sent: Wednesday, May 17, 2000 9:48 PM
> To: xalan-dev@xml.apache.org
> Subject: Re: Xalan port to HPUX11 - iostream
>
>
>
> Hmmm,
>
> It looks like your standard library is quite old. Try including
> iostream.h, and see if that fixes the problem. In general,
> when there is a
> standard file without a .h at the end, try including the one you have
> _with_ the .h.
>
> Dave
>
>
>
>
>
> "Way, Janet"
>
> <JWay@dynasty To:
> xalan-dev@xml.apache.org
>
> .com> cc: (bcc: David
> N Bertoni/CAM/Lotus)
> Subject: Xalan
> port to HPUX11 - iostream
> 05/17/2000
>
> 03:11 PM
>
> Please
>
> respond to
>
> xalan-dev
>
>
>
>
>
>
>
>
>
> David,
>
> You made some changes for me regarding
> XALAN_NO_IOSFWD.
>
> In the file DOMStringHelper.hpp, I am
> to include <iostream>. I don't have
> that file. I have /opt/aCC/include/iostream/iostream.h.
>
> I'm not sure if I have an incomplete installation
> of STL, but the iostream.h file does not define
> the std namespace, as the other files (map,functional,
> vector...) do. So I get the following if I try
> to use namespace...
>
> aCC -O -DXML_USE_NATIVE_TRANSCODER
> -DXML_USE_INMEM_MESSAGELOADER -D_HP_UX
> -DHPaC
> C -DHPUX11 +DAportable +z +inst_compiletime -c -I . -I
> /work2/xerces/ver110/xe
> rces-c-src_1_1_0/src/ -o
> /work2/xalan/xml-xalan/obj/AttributeListImpl.o
> Platfor
> mSupport/AttributeListImpl.cpp
> Error 19: "./PlatformSupport/DOMStringHelper.hpp", line 356 #
> Unexpected
> 'std'.
> std::ostream& theStream,
>
> Is there something different I should be doing,
> or do you think my environment is lacking?
>
> Sorry to be such a pain.
>
> Janet
>
>
>
>
>