When compiling and linking CPI-C applications on Windows systems, you must observe the following:
Every CPI-C program requires the following header files for compilation:
#include <windows.h>
#include <upic.h>
The header file
upic.h
is located in the directory upic-dir\include
.This order of includes shown above is mandatory. It is advisable to compile the program using the option
__STDC__ (ANSI
).When compiling CPI-C programs (UPIC remote only) you must set the following compiler options:
UTM_ON_WIN32
UTM_ON_WIN32
on 32-bit platformsUTM_ON_WIN32
andUTM_ON_WIN64
on 64-bit platforms
You can see the effect of these options in the header file
upic.h
. It is located in the directory upic-dir\include
.A CPI-C program consists of a series of modules which have to be linked to form a program. The following object modules are required for linking:
main program of the user
user modules
For programs which want to use PCMX:
the libraryupicw32.lib
(32-bit) orupicw64.lib
(64-bit), located in the upic-dir\sys
directory.For programs which want to use Socket interface:
the libraryupicws32.lib
(32-bit) orupicws64.lib
(64-bit), located in the upic-dir\SYS
directory.
Once the runtime environment has been made available (see below), you can start a CPI-C program just like any other program in Windows systems.