cinc

Applies to C++

Purpose

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

Syntax


Syntax Diagram

where:


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

Notes

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.

Example

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 References

Compiler Command Line Options IBM Copyright 2003