To compile your Fortran program that calls a C wrapper, which in turn calls the IDL plotting program, you must first, at the very least source the IDL directory:
source $IDL_DIR/bin/idl_setupThen after compiling (easiest to do with a Makefile), you must set some environment variables, then run.
Perhaps the best way to accomplish these tasks is to have a .idlrc script that is sourced before compiling, then another script that executes the .idlrc script, compiles the Makefile, and finally, runs the program.
For links to examples of these scripts and Makefiles, click on the appropriate link below:
Before compiling:
source $IDL_DIR/bin/idl_setupTo compile (SGI version given as an example):
IDL_DIR=/itl/apps/idl-5.1/idl_5.1Before executing (but may also occur before compiling):MODULE = align
WRAPPER = callable_wrapsBINDIR=$(IDL_DIR)/bin/bin.sgi
LDFLAGS= -L$(BINDIR) -lMesaGLU -lMesaGL -lidl -lXm -lXt \
/usr/lib/fixade.o -lX11 -ltermcap -lm -lfpe -lcCFLAGS = -o32 -I$(IDL_DIR)/external
$(MODULE): $(MODULE).o $(WRAPPER).o
f77 -o32 -o $(MODULE) $(MODULE).o $(WRAPPER).o $(LDFLAGS)$(MODULE).o: $(MODULE).f
f77 -o32 -c $(MODULE).f$(WRAPPER).o: $(WRAPPER).c
cc -I$(IDL_DIR)/external -o32 -c $(WRAPPER).c
setenv IDL_DIR /itl/apps/idl-5.1/idl_5.1To run:
setenv LD_LIBRARY_PATH /itl/apps/idl-5.1/idl_5.1/bin/bin.sgi
setenv LM_LICENSE_FILE /itl/apps/licenses/license.dat/idl
./MODULEname