Compiling and Linking PEXlib Programs


For and overview and related topics, see Introduction to PEXlib.

You should include the PEXlib header files with the following C language preprocessor directive inserted in your program:

   #include <X11/PEX5/PEXlib.h>

In most cases, this is sufficient for the compiler to find the file. On some systems, you may need to specify the "-I" option on your C compiler's command line to locate the files.

When linking, specify the library with the option: -lPEX5. On some systems, you may need to use the "-L" option or specify the full path name of the library to help the linker locate the file.

The utility functions use math functions which create a dependency on the math library. This means that all PEXlib applications need to link to the math library, typically specified in the compilation command as -lm.