Path: 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: 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 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