IDL and System Routines

An IDL system routine is an IDL procedure or function that is written in a compiled language with an IDL specific interface, and linked into IDL, instead of being written in the IDL language itself.The best way to create an IDL system routine is to compile and link the routine into a sharable library and then to add the routine to IDL at runtime using either the LINKIMAGE procedure or by making your routines part of a Dynamically Loadable Module (DLM).

Note
We recommend the use of Dynamically Loadable Modules rather than LINKIMAGE whenever possible. The small additional effort is more than compensated for by the superior integration into IDL.

This section explains how to write a system routine, including several examples, and discusses the various options for adding such routines to IDL.

Debugging System Routines

To debug system routines and DLMs, you must attach your debugger to the IDL process that is running your library code. In IDL 7.0 and later, the process to which you should attach the debugger varies, depending on your platform and which version of IDL you are using.

If the IDL Workbench is Running

When the IDL Workbench is running, IDL comprises two processes:

IDL Workbench

This process runs the IDL Workbench interface. It will show up in a process list as idlde.exe on Windows systems, and as a Java command containing the string idlde on Unix-based systems.

IDL Out-of-Process server

This process runs the IDL interpreter and loads shared libraries (DLM's). It will show up in a process list as idl_opserver.exe on Windows systems, and as idl_opserver on Unix-based systems.

To debug your shared library code when the IDL Workbench is running, attach your debugger (gdb, Visual Studio, etc.) to one of the following:

If the IDL Workbench is Not Running

When the IDL is running in command-line mode, IDL comprises either one or two processes:

IDL

On Unix-based systems, the idl process is the only IDL process. On Windows systems, the idl.exe process is a front-end to the idl_opserver.exe process.

IDL Out-of-Process server

On Windows systems, the idl_opserver.exe process runs the IDL interpreter and loads shared libraries (DLM's). Unix-based systems do not use an idl_opserver process when running in command-line mode.

To debug your shared library code when IDL is running in command-line mode, attach your debugger (gdb, Visual Studio, etc.) to one of the following: