Skills Required to Combine External Code with IDL

There is a large difference between the level at which a typical user sees IDL compared to that of the internals programmer. To the user, IDL is an easy-to-use, array-oriented language that combines numerical and graphical abilities, and runs on many platforms. Internally, IDL is a large C language program that includes a compiler, an interpreter, graphics, mathematical computation, user interface, and a large amount of operating system-dependent code.

The amount of knowledge required to effectively write internals code for IDL can come as a surprise to the user who is only familiar with IDL's external face. To be successful, the programmer must have experience and proficiency in many of the following areas:

Microsoft COM

To incorporate a COM object into your IDL program, you should be familiar with COM interfaces in general and the interface of the object you are using in particular.

Microsoft ActiveX

To incorporate an ActiveX control into your IDL widget application, you should be familiar with COM interfaces in general and the interface of the control you are using in particular.

Sun Java

To incorporate a Java object into your IDL program, you should be familiar with Java object classes in general and the methods and data members of the object you are using in particular.

UNIX RPC

To use IDL as an RPC server, a knowledge of Sun RPC (Also known as ONC RPC) is required. Sun RPC is the fundamental enabling technology that underlies the popular NFS (Network File System) software available on all UNIX systems, and as such, is universally available on UNIX. The system documentation on this subject should be sufficient.

ANSI C

IDL is written in ANSI C. To understand the data structures and routines described in this document, you must have a complete understanding of this language.

System C Compiler, Linker, and Libraries

In order to successfully integrate IDL with your code, you must fully understand the compilation tools being used as well as those used to build IDL and how they might interact. IDL is built with the standard C compiler used (and usually supplied) by the vendor of each platform to ensure full compatibility with all system components.

Inter-language Calling Conventions (C++, Fortran, ...)

It is possible to link IDL directly with code written in compiled languages other than C although the details differ depending on the machine, language, and compiler used. It is the programmer's responsibility to understand the inter-language calling conventions and rules for the target environment—there are too many possibilities for ITT Visual Information Solutions to actively document them all. ANSI C is a standard system programming language on all systems supported by IDL, so it is usually straightforward to combine it with code written in other compiled languages. You need to understand:

Alternatives to direct linking (Microsoft COM or Active X) exist on some systems that simplify the details of inter-language linking.

C++

We are often asked if IDL can call C++ code. Compatibility with C has always been a strong design goal for C++, and C++ is largely a superset of the C language. It certainly is possible to combine IDL with C++ code. Callable IDL is especially simple, as all you need to do is to include the idl_export.h header file in your C++ code and then call the necessary IDL functions directly. Calling C++ code from IDL (CALL_EXTERNAL, System Routines) is also possible, but there are some issues you should be aware of:

Fortran

Issues to be aware of when combining IDL with Fortran:

Operating System Features and Conventions

With the exception of purely numerical code, the programmer must usually fully understand the target operating system environment in which IDL is running in order to write code to link with it.

Microsoft Windows

You must be an experienced Windows programmer with an understanding of Windows APIs and DLLs.

UNIX

You should understand system calls, signals, processes, standard C libraries, and possibly even X Windows depending on the scope of the code being linked.