-qcinc (C++ only)

Category

Input control

Pragma equivalent

None.

Purpose

Places an extern "C" { } wrapper around the contents of include files located in a specified directory.

Syntax

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

Defaults

-qnocinc

Parameters

directory_path
The directory where the include files to be wrapped with an extern "C" linkage specifier are located.

Predefined macros

None.

Examples

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();
}