🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2.programmer
Article #2726

C Set/2 compiler linkage question

#2726
From: Tim Francis
Date: Wed, 30 Dec 1992 19:33
21 lines
1412 bytes
In article <1992Dec29.173628.29549@elroy.jpl.nasa.gov>,
hartzman@kilroy.Jpl.Nasa.Gov (Les Hartzman) writes:
>
>I know that the default linkage is "optlink", but if I want to use the
>"system" linkage and still call OS/2 APIs and functions in the C Set/2
>library, what do I have to do?
>
>The "/Ms" option is specified, but things just go crazy because the libraries
>are "optlink" and not "system" linkages.  Do the OS/2 libraries come in
>different flavors or ???
>
>Thanks in advance for any help.

The /Ms option sets the default linkage convention, but any function
can use either _System or _Optlink, simply by specifying the desired
linkage.  Make sure the prototype includes the linkage keyword, so that
the function, and the function call, are consistent.

In the case of the tookit, the headers define every function as APIENTRY,
which is simply _System.  The C Set/2 runtime functions are all _Optlink.
-tim
Technical Details
Message-ID: <19921230.113334.218@almaden.ibm.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!vnet.ibm.com
References: <1992Dec29.173628.29549@elroy.jpl.nasa.gov>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!vnet.ibm.com
From: francis@vnet.ibm.com (Tim Francis)
Message-ID: <19921230.113334.218@almaden.ibm.com>
Date: Wed, 30 Dec 92 14:33:26 EST
Subject: C Set/2 compiler linkage question
Newsgroups: comp.os.os2.programmer
References: <1992Dec29.173628.29549@elroy.jpl.nasa.gov>
Reply-To: francis@vnet.ibm.com
Organization: IBM Canada Lab, WorkFrame/2 development
Disclaimer: This posting represents the poster's views, not those of IBM
Lines: 21