home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / smalltal / 2775 < prev    next >
Encoding:
Text File  |  1993-01-21  |  1.4 KB  |  46 lines

  1. Newsgroups: comp.lang.smalltalk
  2. Path: sparky!uunet!mcsun!Germany.EU.net!news.uni-bielefeld.de!aixrs0!hp06c!koeppen
  3. From: koeppen@hp06c.sonne.informatik.uni-essen.de (Eckhart Koeppen)
  4. Subject: ST V/PM problem using DLLs
  5. Sender: newsadm@aixrs0.hrz.uni-essen.de
  6. Message-ID: <1993Jan21.143717.30225@aixrs0.hrz.uni-essen.de>
  7. Date: Thu, 21 Jan 1993 14:37:17 GMT
  8. Reply-To: koeppen@hp06c.informatik.uni-essen.de (Eckhart Koeppen)
  9. Nntp-Posting-Host: hp06c.informatik.uni-essen.de
  10. Organization: University of Essen, Germany
  11. Lines: 33
  12.  
  13.   I have been trying to build a DLL and call some functions from ST V/PM but
  14. the thing won't work. Here is the code:
  15.  
  16. test.c:
  17.  
  18. void empty(void) asm ("empty"); /* used here to tell gcc 2.1 not to produce */
  19.                                 /* underscores */
  20.  
  21. void empty(void)
  22. {
  23. }
  24.  
  25. test.def:
  26.  
  27. LIBRARY  TEST
  28. EXPORTS  empty
  29.  
  30. The DLL is interfaced through the class TestDLL (subclass of PMHandle).
  31. The class has only one method named fileName which returns 'TEST'. The
  32. only instance method is called empty and looks like this:
  33.  
  34. empty
  35.     "calls the C function empty"
  36.     <api: empty none>
  37.     ^self invalidArgument
  38.  
  39. Though I tried several variations (dropping the asm in the declaration of
  40. test.c: (compiled with gcc 2.1)
  41. The DLL compiles fine and it is no problem to open it with TestDLL open,
  42. but any invocation of the method empty results in an error message.
  43. Any help would be appreciated,
  44.  
  45. Eckhart
  46.