home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / modula2 / 1401 < prev    next >
Encoding:
Text File  |  1992-11-16  |  2.4 KB  |  58 lines

  1. Newsgroups: comp.lang.modula2
  2. Path: sparky!uunet!ukma!wupost!sdd.hp.com!ux1.cso.uiuc.edu!mp.cs.niu.edu!uxa.ecn.bgu.edu!mgmam
  3. From: mgmam@uxa.ecn.bgu.edu (Mark A. Morrell)
  4. Subject: Re: Linking JPI M2 to MicroSoft C .OBJ
  5. Message-ID: <BxtKF1.t0@uxa.ecn.bgu.edu>
  6. Organization: Educational Computing Network
  7. References: <18376.2B02109B@puddle.fidonet.org>
  8. Date: Mon, 16 Nov 1992 17:25:49 GMT
  9. Lines: 47
  10.  
  11. In article <18376.2B02109B@puddle.fidonet.org> John.Mcmonagle@f590.n139.z1.fidonet.org (John Mcmonagle) writes:
  12. >
  13. > MAM> I'm trying to link JPI Modula-2 to an object file which was written with
  14. > MAM> Microsoft C.  I don't have the source to the object file, or anything
  15. > MAM> useful except the names of the procedures included.  I've tried wading
  16. > MAM> throught the JPI documentation to try to find which pragmas I need in
  17. > MAM> order to make the link work, but I haven't quite been able to do it.  I
  18. > MAM> was hoping someone out on the nets would be able to help me out.
  19. >
  20. >The following is from a definition  module that interfaces to a MSC
  21. >library in the large model.
  22. >
  23. >(*# module(implementation=>off, init_code=>off)                 *) 
  24. >
  25. >DEFINITION MODULE MW;
  26. >
  27. >
  28. >(*# data(near_ptr => off),
  29. >    call(o_a_copy => off, o_a_size => off, c_conv => on, near_call => off,
  30. >    reg_saved => (si, di, ds, st1, st2), reg_param => ()),
  31. >    name(prefix => c)
  32. >  *)
  33. >
  34. >Hope this helps. 
  35. >I'm not really that much of an expert at those pragmas. 
  36. >One other thing that could cause problems is  the TopSpeed linker may
  37. >not like some things in msc obj's, but at least Sean Wilson at the
  38. >Clarion US office has ways to fix most possible problems. Clarion US
  39.  
  40. Thanks for the help on this, but I already got that stuff out of the
  41. developers guide.
  42.  
  43. I found that the real problem was that even with this stuff, the linker
  44. wasn't linking in the object code.  I had to add the line:
  45.  
  46. #pragma link(clogin.obj)
  47.  
  48. to the project file in order to make the linker use the object file.  I
  49. would have thought that having the definition file with the 
  50. implementation=>off (just like you have above) would have done it, but
  51. you have to TELL it to link the obj.  BTW, all of what you have above 
  52. is also correct.  Thanks for the effort...
  53. -- 
  54. --------------------------------------------------------------------
  55. Mark A. Morrell     Disclaimer:  _I_ probably don't even believe it.
  56. Literary Reference:  The introduction to Cervantes' Don Quixote.
  57.  
  58.