|
External Development Guide: Remote Procedure Calls |
|
To make use of the IDL RPC functionality, you will need to do the following:
idl_rpc.h in your application.
idl_export.h in the include path when you compile the client application.
libidl_rpc).
The name of this variable is normally LD_LIBRARY_PATH, except on HP and IBM systems, where the variable names are:
If this variable is not set correctly, an error message will be issued by the system loader when the client program is started.
The command used to compile and link a client program to the IDL RPC client library follows the following format:
% cc -o example $(PRE_FLAGS) example.o -lidl_rpc $(POST_FLAGS)
where PRE_FLAGS and POST_FLAGS are platform dependent. The proper flags for each UNIX operating system supported by IDL are contained in the file Makefile, located in the in the rpc subdirectory of the external subdirectory of the main IDL directory.
To use the IDL client side API, execute the following sequence of steps:
The code shown in the following figure is an example that can be used to set up a remote session of IDL using the RPC features. Note that this C program will need to be linked against the supplied shared library libidl_rpc. This code is included in the idldir/external/rpc directory as example.c.
Compile example.c with the appropriate flags for your platform, as described in Linking to the Client Library. Once this example is compiled, execute it using the following commands:
% idlrpc
Then, in another process:
% example
IDL Online Help (March 06, 2007)