Path: utzoo!attcan!uunet!mcvax!unido!rmi!kkaempf
From: kkaempf@rmi.UUCP (Klaus Kaempf)
Newsgroups: comp.sys.amiga
Subject: Re: trouble opening intuition.library
Message-ID: <1278@rmi.UUCP>
Date: 28 Nov 88 13:51:43 GMT
References: <5679@louie.udel.EDU>
Reply-To: kkaempf@rmi.UUCP (Klaus Kaempf)
Organization: RMI Net, Aachen, W.Germany
Lines: 27

In article <5679@louie.udel.EDU> mermelstein%tel.inrs.cdn@relay.ubc.ca (lois mermelstein) writes:
: Help -- I'm having serious trouble opening the intuition.library (so I can
: open windows onto Workbench, etc.)
: 
: I'm using code like:
: 
: struct IntuitionBase *IntuitionBase;
: #define INTUITION_REV /*either 33, 0, 33L, or 0L */
: 
: main()
: {
: IntuitionBase = (struct IntuitionBase *)OpenLibrary("intuition.library",
: 	INTUITION_REV);
: if (IntuitionBase == NULL)
: {	printf("Couldn't open lib.\n");
: 	exit()
: }
: I'm using Manx 3.6A with the default c.lib (16 bit ints) on a 2-floppy
					      ^^^^^^^^^^ Aha !
Put something like 'void *OpenLibrary();' or '#include '
in your code, it really helps.

Without it, the 16bit manx thinks of OpenLibrary() as a function returning
a (16bit!) int. Casting that to a (struct IntuitionBase *) won't work !!!


Klaus