1 Introducing Pro*C/C++

This chapter describes Pro*C/C++, the Oracle programmatic interface for the C and C++ languages running on Windows operating systems. Pro*C/C++ enables you to build Oracle database applications in a Win32 environment.

This chapter contains these topics:

What Is Pro*C/C++?

The Pro*C/C++ precompiler enables you to create applications that access your Oracle database whenever rapid development and compatibility with other systems are your priorities.

The Pro*C/C++ programming tool enables you to embed Structured Query Language (SQL) statements in a C or C++ program. The Pro*C/C++ precompiler translates these statements into standard Oracle runtime library calls, then generates a modified source program that you can compile, link, and run in the usual way.


Pro*C/C++ supports the following features:

  • Remote access with Oracle Net Services or local access to Oracle databases

  • Embedded PL/SQL blocks

  • Bundled database calls, which can provide better performance in client/server environments

  • Full ANSI compliance for embedded SQL programming

  • PL/SQL version 9.0 and host language arrays in PL/SQL procedures

  • Multi-threaded applications

  • Full ANSI C compliance

  • Can be deployed in Instant Client environments. For more information, refer to the OCI Instant Client documentation.

  • Microsoft Visual C++ support, version 6.0 for 32-bit applications


    Borland C++ is no longer supported.


Pro*C/C++ does not support 16-bit code generation.

Directory Structure

Installing Oracle software creates a directory structure on your hard drive for the Oracle products. A main Oracle directory contains the Oracle subdirectories and files that are necessary to run Pro*C/C++.

When you install Pro*C/C++, Oracle Universal Installer creates a directory called \precomp in the ORACLE_BASE\ORACLE_HOME directory. This subdirectory contains the Pro*C/C++ executable files, library files, and sample programs listed in Table 1-1.

Table 1-1 precomp Directory Structure

Directory Name Contents


Configuration files


Sample programs for Pro*C/C++


SQL scripts for sample programs


Readme files for Pro*C/C++


Help files for Pro*C/C++


Library files for Pro*C/C++


Message files


Miscellaneous files for Pro*C/C++


Header files


The \precomp directory can contain files for other products, such as Pro*COBOL.

Known Problems, Restrictions, and Workarounds

Although all Windows operating systems allow spaces in file names and directory names, the Oracle Pro*C/C++ and Oracle Pro*COBOL precompilers will not precompile files that include spaces in the filename or directory name. For example, do not use the following formats:

  • proc iname=test one.pc

  • proc iname=d:\dir1\second dir\sample1.pc