Difference between revisions of "SDK Linking C Functions"
Yvonnemilne (Talk | contribs) |
Yvonnemilne (Talk | contribs) |
||
(3 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
External 'C' Functions can be linked into the following Recital product executables: | External 'C' Functions can be linked into the following Recital product executables: | ||
Line 7: | Line 5: | ||
!Product||Relinked Executables | !Product||Relinked Executables | ||
|- | |- | ||
− | |Recital | + | |Recital Developer for Linux||<path>/db.exe |
|- | |- | ||
− | |Recital | + | |Recital Developer for UNIX ||<path>/db.exe |
|- | |- | ||
− | |Recital | + | |Recital Developer for OpenVMS||[<path>]DB_XX.EXE |
|- | |- | ||
− | |Recital | + | |Recital Server for Linux||<path>/db_netserver |
<path>/db_recserver | <path>/db_recserver | ||
|- | |- | ||
− | |Recital | + | |Recital Server for UNIX||<path>/db_netserver |
<path>/db_recserver | <path>/db_recserver | ||
|- | |- | ||
Line 30: | Line 28: | ||
!Product||Default API Linked Directory | !Product||Default API Linked Directory | ||
|- | |- | ||
− | |Recital | + | |Recital Developer for Linux||<path>/sdk/api/linked |
|- | |- | ||
− | |Recital | + | |Recital Developer for UNIX ||<path>/sdk/api/linked |
|- | |- | ||
− | |Recital | + | |Recital Developer for OpenVMS||[<path>.SDK.API] |
|- | |- | ||
− | |Recital | + | |Recital Server for Linux||<path>/api/linked |
|- | |- | ||
− | |Recital | + | |Recital Server for UNIX||<path>/api/linked |
|- | |- | ||
|} | |} | ||
Line 57: | Line 55: | ||
==Linking in 'C' functions== | ==Linking in 'C' functions== | ||
− | Once all the 'C' functions are defined in the db.api file the dbmake | + | Once all the 'C' functions are defined in the db.api file the dbmake (Recital Developer) or dbsmake (Recital Server) utilities are used to link them into the Recital executables as defined above. |
Line 63: | Line 61: | ||
!Product||dbmake | !Product||dbmake | ||
|- | |- | ||
− | |Recital | + | |Recital Developer for Linux||<path>/sdk/api/linked/dbmake |
|- | |- | ||
− | |Recital | + | |Recital Developer for UNIX ||<path>/sdk/api/linked/dbmake |
|- | |- | ||
− | |Recital | + | |Recital Developer for OpenVMS||[<path>.SDK.API]DBMAKE.COM |
|- | |- | ||
− | |Recital Universal Application Server for Linux||<path>/api/linked/ | + | |Recital Universal Application Server for Linux||<path>/api/linked/dbsmake |
|- | |- | ||
− | |Recital Universal Application Server for UNIX||<path>/api/linked/ | + | |Recital Universal Application Server for UNIX||<path>/api/linked/dbsmake |
|- | |- | ||
|} | |} | ||
− | |||
Latest revision as of 10:06, 9 June 2009
External 'C' Functions can be linked into the following Recital product executables:
Product | Relinked Executables |
---|---|
Recital Developer for Linux | <path>/db.exe |
Recital Developer for UNIX | <path>/db.exe |
Recital Developer for OpenVMS | [<path>]DB_XX.EXE |
Recital Server for Linux | <path>/db_netserver
<path>/db_recserver |
Recital Server for UNIX | <path>/db_netserver
<path>/db_recserver |
Defining the C functions
External 'C' functions are defined in the RECITAL/API definition file db.api located in the 'api linked' directory.
Product | Default API Linked Directory |
---|---|
Recital Developer for Linux | <path>/sdk/api/linked |
Recital Developer for UNIX | <path>/sdk/api/linked |
Recital Developer for OpenVMS | [<path>.SDK.API] |
Recital Server for Linux | <path>/api/linked |
Recital Server for UNIX | <path>/api/linked |
The first column contains the RECITAL function name and the second column contains the name of the 'C' function to be linked with RECITAL. When writing functions in 'C', Recital recommends that they are prefixed with "dbapi_" so that they do not conflict with any internal Recital functions. The dbmake linking utility will automatically compile and link in all the *.c files in the 'api linked' directory.
RECITAL NAME C FUNCTION NAME
apitest dbapi_apitest
The Recital function name cannot be longer than 10 characters.
Linking in 'C' functions
Once all the 'C' functions are defined in the db.api file the dbmake (Recital Developer) or dbsmake (Recital Server) utilities are used to link them into the Recital executables as defined above.
Product | dbmake |
---|---|
Recital Developer for Linux | <path>/sdk/api/linked/dbmake |
Recital Developer for UNIX | <path>/sdk/api/linked/dbmake |
Recital Developer for OpenVMS | [<path>.SDK.API]DBMAKE.COM |
Recital Universal Application Server for Linux | <path>/api/linked/dbsmake |
Recital Universal Application Server for UNIX | <path>/api/linked/dbsmake |
Using the 'C' functions
Once the functions have been linked into Recital they can be used in the same way that a Recital function can be used.
If you do not specify the correct number of parameters to the 'C' function Recital will display the error message "Invalid parameter". If the incorrect data type is passed, Recital will display the error message "Data type mismatch in parameter list."