Article View: comp.windows.interviews
Article #347Re: problems porting interviews to ISC3.0
From: Roger Sheldon - AISS
Date: Thu, 16 Apr 1992 16:46
Date: Thu, 16 Apr 1992 16:46
59 lines
2230 bytes
2230 bytes
In article <root.703007674@scuzzy> root@utopia.contrib.de (Thomas Kaulmann) writes:
>
>hi,
>i'm a beginner with c++ and InterViews and i try to get it to run on
>my intel platform under isc3.0 with g++-2.1 and libg++-2.0.
>i have a problem with building the Unidraw lib. i fixed it temporarily
>by commenting out the nasty code ;-)
>
>
> g++ -O -Div2_6_compatible -DISC -DSYSV386 -DSYSV -DUSG -I../../../.././src/include/InterViews/2.6 -I../../../.././src/include/IV-look/2.6 -I../../../.././src/include -c ../catalog.c
>// SOME WARNINGS DELETET....
>../catalog.c:1596: bad argument 0 for function `istream::istream (struct streambuf*, class ostream* (= 0 ))' (type was unsigned int )
>../catalog.c:1596: in base initialization for class `istream'
>*** Error code 1
>
>Stop.
>
>the error occurs in catalog.c in libUnidraw.a in the following function
>in line 1596:
>
>PSPattern* Catalog::ReadPattern (const char* n, int index) {
> const char* def = GetAttribute(Name(n, index));
>
> if (def == nil) {
> return nil;
> }
> char* definition = strnew(def); // some sscanfs write to their format...
>
> PSPattern* pat = nil;
> boolean none = (definition[0] == 'n' || definition[0] == 'N');
>
> if (none) {
> pat = FindNonePattern();
>
> } else {
> if (strchr(definition, '.') != nil) {
>// STUFF DELETED
> } else {
> istream in(strlen(definition) + 1, definition); // HERE IS THE PROBLEM
Here's my workaround
#ifdef __GNUG__
streambuf sb;
sb.setbuf(definition, strlen(definition)+1);
istream in(&sb);
#else
istream in(strlen(definition) + 1, definition);
#endif
... stuff deleted
This seems like it should do the trick, but I'm just in the
middle of trying to build iv 3.0 myself, so use this advice
with caution.
Hope this helps,
Roger
Technical Details
Message-ID:
<1992Apr16.164640.6327@kong.gsfc.nasa.gov>Path:
arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!mimsy!kong!sheldonReferences:
<root.703007674@scuzzy>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!mimsy!kong!sheldon From: sheldon@kong.gsfc.nasa.gov (Roger Sheldon - AISS) Newsgroups: comp.windows.interviews Subject: Re: problems porting interviews to ISC3.0 Message-ID: <1992Apr16.164640.6327@kong.gsfc.nasa.gov> Date: 16 Apr 92 16:46:40 GMT References: <root.703007674@scuzzy> Organization: Goddard Space Flight Center Lines: 60