Calling the C/C++ Precompiler 

Use

The C/C++ precompiler only compiles files with the file extension .cpc. From the file <file_name>.cpc, it generates the file <file_name>.c, which the C Compiler or the C++ Compiler can then convert.

Prerequisites

The environment variable PATH contains the path /opt/sapdb/interfaces/precompiler/bin.

Procedure

Use the following command to call the C/C++ precompiler:

cpc [–d <servernode> –u <userid>,<password>] <file_name>

<server node>

The name of the database instance

<userid>

User name

<password>

User password

<file_name>

The name of the file to be compiled without the file extension

cpc –d DB -u Armstrong,Secret testfile

Options

The following options, among others, are available to you when calling the C/C++ precompiler:

Specify the database instance

-d

User ID

-u

Override connection to the database instance

-Hnocheck

Override the C/C++ Compiler

-c

For more information about the available options see: C/C++ Precompiler: SAP DB 7.3.