home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / os2 / programm / 7245 < prev    next >
Encoding:
Internet Message Format  |  1992-12-30  |  1.3 KB

  1. Path: sparky!uunet!vnet.ibm.com
  2. From: francis@vnet.ibm.com (Tim Francis)
  3. Message-ID: <19921230.113334.218@almaden.ibm.com>
  4. Date: Wed, 30 Dec 92 14:33:26 EST
  5. Subject: C Set/2 compiler linkage question
  6. Newsgroups: comp.os.os2.programmer
  7. References: <1992Dec29.173628.29549@elroy.jpl.nasa.gov>
  8. Reply-To: francis@vnet.ibm.com
  9. Organization: IBM Canada Lab, WorkFrame/2 development
  10. Disclaimer: This posting represents the poster's views, not those of IBM
  11. Lines: 21
  12.  
  13. In article <1992Dec29.173628.29549@elroy.jpl.nasa.gov>,
  14. hartzman@kilroy.Jpl.Nasa.Gov (Les Hartzman) writes:
  15. >
  16. >I know that the default linkage is "optlink", but if I want to use the
  17. >"system" linkage and still call OS/2 APIs and functions in the C Set/2
  18. >library, what do I have to do?
  19. >
  20. >The "/Ms" option is specified, but things just go crazy because the libraries
  21. >are "optlink" and not "system" linkages.  Do the OS/2 libraries come in
  22. >different flavors or ???
  23. >
  24. >Thanks in advance for any help.
  25.  
  26. The /Ms option sets the default linkage convention, but any function
  27. can use either _System or _Optlink, simply by specifying the desired
  28. linkage.  Make sure the prototype includes the linkage keyword, so that
  29. the function, and the function call, are consistent.
  30.  
  31. In the case of the tookit, the headers define every function as APIENTRY,
  32. which is simply _System.  The C Set/2 runtime functions are all _Optlink.
  33. -tim
  34.