Pro*C/C++ Precompiler Getting Started Release 9.2 for Windows Part Number A96111-01 |
|
This appendix describes how to integrate Pro*C/C++ into the Microsoft Visual C++ integrated development environment.
This appendix contains these topics:
This section describes how to fully integrate Pro*C/C++ within Microsoft Visual C++ projects.
All the precompiler errors and warnings are displayed in the output box where Microsoft Visual C++ displays compiler and linker messages. You do not have to precompile a file separately from the Microsoft Visual C++ build environment. More importantly, Microsoft Visual C++ maintains the dependencies between .c
and .pc
files. Microsoft Visual C++ maintains the dependency and precompile files, if needed.
All of the procedures in this section are performed within Microsoft Visual C++.
For Microsoft Visual C++ to run Pro*C/C++, it must know the location of the Pro*C/C++ executable. If Microsoft Visual C++ was installed before any Oracle release 9.2 products were installed, then you must add the directory path.
To specify the location of the Pro*C/C++ executable:
ORACLE_BASE\ORACLE_HOME
\bin
directory. For example:C:\oracle\ora92\bin
To specify the location of the Pro*C/C++ header files:
ORACLE_BASE\ORACLE_HOME
\precomp\public
directory. For example:
C:\oracle\ora92\precomp\public
After you create a project, you need to add the .pc
file(s).
To add a .pc
file to a project:
For each .pc
file, you need to add a reference to the .c
file that will result from precompiling.
To add a reference to a .c
file to a project:
.c
file in the File Name box..c
file has not been created yet, Microsoft Visual C++ displays the following message: "The specified file does not exist. Do you want to add a reference to the project anyway?"Pro*C/C++ applications must link with the library file orasql9.lib
.
To add the Pro*C/C++ library to a project:
orasql9.lib
from the ORACLE_BASE\ORACLE_HOME
\precomp\lib\msvc
directory.To specify custom build options:
.pc
file and choose Settings. The Project Settings dialog box appears with the Custom Build tab displayed.
$ORACLE_HOME
setting..c
files, then enter $(ProjDir)\$(InputName).c
..cpp
files, then enter $(ProjDir)\$(InputName).cpp
.$(ProjDir)
and $MSDEVDIR
are macros for custom build commands in Microsoft Visual C++. When the project is built, Microsoft Visual C++ checks the date of the output files to determine whether they need to be rebuilt for any new modifications made to the source code.
You can include Pro*C/C++ as a choice in the Tools menu of Microsoft Visual C++.
To add Pro*C/C++ to the Tools menu:
Pro*C/C++
C:\oracle\ora92\bin\procui.exe
$(TargetName)
When you choose Pro*C/C++ from the Tools menu, Microsoft Visual C++ uses the $(TargetName)
argument to pass the name of the current development project to Pro*C/C++. Pro*C/C++ then opens a precompile project with the same name as the opened project, but with a .pre
extension in the project directory.
$(WkspDir)
The Customize dialog box should now look like the following graphic (although the Oracle home directory may be different on your computer).
Text description of the illustration ms1.gif
|
Copyright © 1994, 2002 Oracle Corporation. All Rights Reserved. |
|