Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Compilation, linking, starting on Unix and Linux systems

&pagelevel(5)&pagelevel

When compiling and linking CPI-C applications on Unix and Linux systems, you must observe the following:

  • Every CPI-C program requires the following header file for compilation:

    #include <upic.h>

    The header file is located in the include subdirectory of the UPIC installation directory.

  • A CPI-C program consists of a set of modules which must be linked as a program using the C compiler of your system. The following object modules are essential for linking:

    • main program of the user

    • user modules

    For programs which use PCMX:

    • the system libraries nsl.so, dl.so, socket.so (not on every system) and cmx.so The library cmx.so must be linked in before the library nls.so.

    • the library libupiccmx which can be found in the upic-dir/sys/ directory.

    For programs which do not use PCMX:

    • the system libraries nsl.so and dl.so. On a few systems socket.so also

    • the library libupicsoc which can be found in the upic-dir/sys/ directory.

    For programs which do not use PCMX and use multi-threading:

    • the system libraries nsl.so, dl.so and socket.so

    • the library libupicsocmt which can be found in the upic-dir/sys/ directory.

    An example showing all necessary library and link options can be found in the makefile for the sample program uptac.c in the upic-dir/sample directory.

  • A CPI-C program is started just like any other program in Unix and Linux systems by entering the program name (note that the UTM application must be started beforehand).