home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / amiga / programm / 16163 < prev    next >
Encoding:
Internet Message Format  |  1992-11-20  |  1.7 KB

  1. Path: sparky!uunet!psinntp!ncrlnk!ncr-mpd!kentd
  2. From: kentd@FtCollins.NCR.com (Kent Dalton)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: gcc2.2.2 open a library
  5. Message-ID: <KENTD.92Nov19103850@zappa.FtCollins.NCR.com>
  6. Date: 19 Nov 92 10:38:50 GMT
  7. References: <1992Nov18.020038.21890@samba.oit.unc.edu>
  8. Sender: uucp@ncr-mpd.FtCollinsCO.NCR.COM
  9. Organization: NCR Microelectronics, Ft. Collins, CO
  10. Lines: 34
  11. In-reply-to: Walt.Namitz@launchpad.unc.edu's message of 18 Nov 92 02:00:38 GMT
  12.  
  13. >>>>> On 18 Nov 92 02:00:38 GMT, (Walt Namitz) said:
  14.  
  15.  
  16. Here's my guess.
  17.  
  18. Walt> #include<stdio.h>
  19. Walt> #include<intuition/intuition.h>
  20. Walt> extern long OpenLibrary;
  21.       ^^^^^^^^^^^^^^^^^^^^^^^
  22.  
  23. Here you declare OpenLibrary as an external variable of type long
  24. integer. Then later you try to call it is a function returning a pointer
  25. datatype:
  26.  
  27. Walt>     IntuitionBase = (struct IntitionBase *)
  28. Walt>             OpenLibrary("intuition.library",33);
  29.  
  30. And then the compiler gets way confused because you're trying to invoke
  31. a variable as a function:
  32.  
  33. Walt> When I compile this fragment I get the following error which
  34. Walt> refers to the line that tries to open the library;
  35. Walt>
  36. Walt> Called object is not a function
  37.  
  38. --
  39. /**************************************************************************/
  40. /* Kent Dalton                   * EMail: Kent.Dalton@FtCollinsCO.NCR.COM */
  41. /* NCR Microelectronics          * Phone: (303) 223-5100 X-319            */  
  42. /* 2001 Danfield Ct. MS470A      *   FAX: (303) 226-9556                  */
  43. /* Fort Collins, Colorado 80525  *                                        */
  44. /**************************************************************************/
  45. SHHHH!!  I hear SIX TATTOOED TRUCK-DRIVERS tossing ENGINE BLOCKS
  46.  into empty OIL DRUMS..
  47.