Pro*C/C++ Getting Started for Windows Platforms Go to Product Documentation Library
Library
Go to books for this product
Product
Go to Contents for this book
Contents
Go to Index
Index



Go to previous file in sequence Go to next file in sequence

Integrating into a C/C++ Environment



Integrating Microsoft Visual C++

Developing 32-bit Applications

Use the following steps to integrate Pro*C/C++ into the Microsoft Visual C++ Version 4.2 environment:

  1. From within Visual C++, select Customize from the Tools menu, then click on the Tools tab. The Customize screen appears.

  2. To add another tool to the Tools list, select the Add button. The Add Tool dialog box appears.

  3. From the C:\ORANT\BIN directory, select PROCUI30.EXE, and then choose OK.
  4. The Customize screen re-appears. The Command and Menu Text fields are automatically filled in with appropriate Pro*C/C++ information. Type $(TargetName) in the Arguments field and $(WkspDir) in the Initial directory field.

    When you select "Pro*C/C++ 3.0" from the menu, the $(TargetName) argument is used 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.

  5. Choose Close to add the new option to the list under the Tools menu item.

Developing 16-bit Applications

Use the following steps to integrate Pro*C/C++ into the Microsoft Visual C++ Version 1.52c environment:

  1. From within Visual C++, select Tools from the Options menu. The Tools dialog box appears.
  2. To add another tool to the Tools list, select the Add button. The Add Tool dialog box appears.


  3. From the %ORACLE_HOME%\BIN directory, select PROCUI22.EXE and then select the OK button.
  4. The Tools dialog box re-appears. The Command Line and the Menu Text fields are automatically filled in with appropriate Pro*C information.

  5. Enter $proj in the Arguments field.
  6. Enter $projdir in the Initial Directory field.
  7. Once you have filled out all the fields, choose the OK button. This adds the new option to the list under the Tools menu item.
  8. When you select Pro*C/C++ 2.2 from the menu, the $Proj argument is used 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.

Integrating Pro*C/C++ within Microsoft Visual C++ Projects

Use the following steps to directly integrate Pro*C/C++ with Microsoft Visual C++ Version 4.2 project. Microsoft Visual C++ maintains the dependency and precompile files if needed. All the precompiler errors and warnings are displayed in the output box where Microsoft Visual C++ displays compiler and linker messages. Now, you do not have to precompile a file separately from the Microsoft Visual C++ build environment. More importantly, Microsoft Visual C++ maintains the dependency between .c and .pc files.

In the following steps, SAMPLE.PC is a sample source file that when precompiled, creates SAMPLE.C.

  1. Create a New project sample and add sample.pc into the project using "Insert" menu option then "Files into Project" in the menu list.


  2. Add sample.c into the Sample project using "Insert" menu option then "Files into Project" in the menu list.


  3. Note Currently, sample.c does not exist, therefore Microsoft Visual C++ displays a message box prompting, "This file does not exist. Do you want a reference added to the project anyway?" Click on Yes.

  4. Click on the "Build" menu option and select the "Settings" option. Click on the "Custom Build" tab. In the "Setting For " screen, expand both the debug and release projects by clicking on the "+"sign. Then select sample.pc from both debug and release settings.
    1. In the "Build command(s)" field, enter:
    proc $(ProjDir)\$(InputName).pc include=c:
    
    \orawin95\pro30\c\include
    

    1. In the "Output Files" field, enter:
      $(ProjDir)\$(InputName).c
    2. Choose OK to accept the settings.
    3. Add sqllib19.lib to your project.
    4. Include Pro*C/C++ header files directory by first selecting the Tools option from the menu bar and then choosing Options. Click on the Directories tab and select "Include Files" from the "show directories for" list box. Add the directory, "%oracle_home%\pro30\c\include" where %oracle_home% must be replaced by your designated oracle home directory. Then click OK.


    5. Note For Microsoft Visual C++ to run Pro*C/C++, it needs to know the directory path for the Pro*C/C++ executable. If this is the first time you have installed Oracle, then you need to add the directory path. From the "Tools"menu option, select "Options". Then from the Options dialog box, click on the "Directories" tab. Select "Executable files" from "Show directories for:" dropdown list box. Make sure that c:\ORAWIN95\BIN is listed under executable files. If it is not listed, then add this directory path to the list.

    Integrating with Borland C++

    Developing 16-bit and 32-bit Applications

    Use the following steps to integrate Pro*C/C++ into the Borland C++ Version 5.0 for both the 16- and 32-bit environment:

    1. From within Borland C++, select Tools from the Options menu.
    2. The Tools dialog box appears.

    3. To add another tool, choose the New button.
    4. The Tool Options dialog box appears.

    5. Choose the Browse button. The Tool Path dialog box appears.
    6. Select PROCUI22.EXE from the %ORACLE_HOME%\BIN directory.
    7. Choose the OK button.
    8. The Tool Options dialog box reappears with the Path field automatically filled in.

    9. Enter a suitable name, such as Pro*C/C++ for Windows, in the Name field.
    10. Enter $PRJNAME in the Command Line field.
    11. Enter a suitable name, such as Pro*C/C++ 2.2, in the Menu Text field.
    12. Enter Precompile in the Help Hint field. This help text is displayed when you select Pro*C from the Tools list or the menu bar in the Tools dialog box.
    13. Once you have filled out all the fields, choose the OK button. This adds the new option to the list in the Tools dialog box.

    When you select Pro*C from the menu, the $PRJNAME argument is used 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 but with a .PRE extension in the project directory.



    Go to previous file in sequence Go to next file in sequence
    Prev Next
    Oracle
    Copyright © 1996 Oracle Corporation.
    All Rights Reserved.
    Go to Product Documentation Library
    Library
    Go to books for this product
    Product
    Go to Contents for this book
    Contents
    Go to Index
    Index