C++ only


Instructs the compiler to place an extern "C" { } wrapper around the contents of an include file.


Read syntax diagramSkip visual syntax diagram        .-nocinc--------------------.
>>- -q--+-cinc--=--directory_prefix-+--------------------------><


directory_prefix Specifies the directory where files affected by this option are found.


Include files from specified directories have the tokens extern "C" { inserted before the first statement in the include file, and } appended after the last statement in the include file.


Assume your application myprogram.C includes header file foo.h, which is located in directory /usr/tmp and contains the following code:

int foo();

Compiling your application with:

xlc++ myprogram.C -qcinc=/usr/tmp

will include header file foo.h into your application as:

extern "C" {
int foo();

Related information