T.08 - (OLD) How to link the library in IDL/PV-WAVE ?¶
Answer¶
In IDL/PV-WAVE, the CALL_EXTERNAL function provides an easy-to-use access to UNILIB routines by the way of a sharable image or object. Unfortunately, this functionality is not supported for every platform, and, may operate differently between different operating systems and between IDL and PV-WAVE. This FAQ provides the way to build and use such shareable image or object for some platforms.
OpenVMS¶
The UNILIB distribution includes already a shareable image (unilib.exe) that can be linked with IDL under OpenVMS AXP plateform (but not with PV-WAVE since the floating memory format used is different). From the object libraries of the UNILIB distribution, it is also possible to build a shareable image for:
IDL or PV-WAVE on VAX station, using the VAX version of unilib.olb (D_float);
PV-WAVE on AXP station, using the AXP version of unilib.olb (G_float).
Please note that the shareable image unilib.exe of version 2.03 and earlier uses the D_float floating memory format which is supported by IDL versions earlier than version 5.2. Since version 5.2, IDL uses the IEEE floating memory format. For additional information, please check T.05 - How to pass correctly the subroutine arguments in IDL ?.
UNIX¶
On UNIX, only routines that adhere to the C (argc, argv) calling convention can be called from IDL. Since version 2.24 of the UNILIB library, wrapper routines for the UNILIB subroutines are included that provide an interface between the main routines of the UNILIB library and IDL. The shareable object can be tested from IDL with the the following instructions:
ifail = 0L
status = CALL_EXTERNAL( 'unilib.so', 'idl_ut990', 6L, 1L, ifail )
Under HP-UX the string unilib.sl has to be used instead of unilib.so. For additional information, please see the examples.
PC/Windows¶
The UNILIB distribution includes a DLL file (unilib.dll). The dynamic linked library can be tested from IDL with the the following instructions:
ifail = 0L
status = CALL_EXTERNAL( 'unilib.dll', 'idl_ut990_', 6L, 1L, ifail )
Note that unilib.dll makes use of two Digital Fortran libraries, dformd.dll and dforrt.dll. Copies of these DLL are included in the distribution. For additional information, please see the examples
Illustration¶
None
See also¶
UNILIB/tags/v3.02