(v13) C compilation
This page applies to Harlequin v13.1r0 and later; and to Harlequin MultiRIP but not Harlequin Core
A typical invocation of the compiler looks like this, stripped of makefile syntax:
cl -c -W4 -Ias-required -Ikit-location\include -D_X86_ \
-O2 -Gd -Fowhatever.obj whatever.c
(Refer to the Microsoft online documentation for details of the flags.)
-I
says where to look for include files. There are four variations of header which might be required:
- Headers private to the plugin
- Plugin kit headers
- Windows headers
- Device driver kit headers
The -D
define _X86_
is required for the correct operation of the Windows header files.
For symbolic debugging, add the compiler flag -Zi
to retain symbols (you may wish to do this any‐ way). It is usually easier to debug if optimization is turned off; replace -O2
(maximize speed) and -G5
(optimize for Pentium) with -Odi
and make appropriate changes to the link options (see (v13) Linking
).