🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #7362

Re: Problem with OpenLibrary() under 2.0

#7362
From: Narciso Jaramillo
Date: Tue, 11 Dec 1990 05:31
22 lines
1368 bytes
In article <9012101903.AA146539@vttcf.cc.vt.edu> fmcphers@VTTCF.CC.VT.EDU (Frank McPherson) writes:

> I'm trying to play around with windows and such.  I've encountered an error
> I can't figure out.  Here is the stuff:

> [...]
> void OpenLibrary();                            
  ^^^^
> if (!(IntuitionBase = (struct IntuitionBase *) 
>    OpenLibrary("intuition.library")))          
> [...]

> Manx 5.0d tells me that there's an invalid type conversion
> in the if statement, right on the second close paren after the actual 
> OpenLibrary() call.

You're declaring OpenLibrary() as void, then using its return value--strictly
a no-no.  It should be declared as struct Library *OpenLibrary().  Also, you
should put the 0L back in the call to OpenLibrary.


nj
Technical Details
Message-ID: <NJ.90Dec10213112@magnolia.Berkeley.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!julius.cs.uiuc.edu!apple!agate!agate.berkeley.edu!nj
References: <9012101903.AA146539@vttcf.cc.vt.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!julius.cs.uiuc.edu!apple!agate!agate.berkeley.edu!nj
From: nj@magnolia.Berkeley.EDU (Narciso Jaramillo)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Problem with OpenLibrary() under 2.0
Message-ID: <NJ.90Dec10213112@magnolia.Berkeley.EDU>
Date: 11 Dec 90 05:31:12 GMT
References: <9012101903.AA146539@vttcf.cc.vt.edu>
Sender: usenet@agate.berkeley.edu (USENET Administrator)
Organization: /h/bair/nj/.organization
Lines: 22
In-Reply-To: fmcphers@VTTCF.CC.VT.EDU's message of 10 Dec 90 19:03:00 GMT