Integrated Pro * CC ++ in the VC ++ development environment (〖〖米〗, there is something to say)

xiaoxiao2021-03-06  26

The content discussed herein is based on the following environment: Microsoft Visual C 6.0 Oracle 8i (8.1.7)

Current version: 1.0 (041221)

Disclaimer: Some operations described herein may have a significant impact on the system, please use it with caution! I am responsible for any consequences of this!

Integrated Pro * C / C in a VC development environment

Pro * C / C Access the Oracle database for the C / C language provides great convenience, however, often need to compile PC files in naming mode when compiling, and most developments are in VC integrated development environment It is done in the middle, but it is necessary to turn on the two, not only troubles and is quite inconvenient for debugging. In VC , the settings for "Custom Compilation Steps" are provided to let us define how to handle the PC file. Now it is a brief introduction: First, make sure you have an Oralce's Pro * C / C . Then, run Visual C , open an engineering file (Workspace), custom compilation steps only for a certain project. Select "Project" -> "Settings ...". Select which configuration settings, select All Configrations to overwrite all configurations. First select all items, click on the "Linker" tab, add: ORASQL8.LIB. (Different Oracle versions, this file name will be different)

Click on the "Custom Build" tab, add the following in the "Commands" edit box: call vcvars32.bat proc iname = "$ (inputdir) / $ (InputName) .pc" incrude = "% msvcdir% / include" incrude = " $ (Msdevdir) /../ vc98 / include "code = cpp parse = Partial Here: Call vcvars32.bat This is used to set the compilation environment of the VC. Proc iname = "$ (InputDir) / $ (InputName) .PC" include = "% msvcdir% / include" incrude = "$ (msdevdir) /../ vc98 / include" code = CPP PARSE = Partial This is Direct call Proc compiler compiles, the VCs such as $ (InputDir) will replace themselves, do not need to handle it manually. Here is something to pay attention to: Parameters passing to Proc, it is best to add quotation, if there is a space in unfortunate, it will be used as another parameter, which is difficult to check.

Add the following: $ (InputDir) / $ (InputName) .cpp This is to tell VC which file is finally generated, so that it takes it. Click "OK" to save so we can edit the Pro * C file directly in VC . In addition, in the property setting, you can set a custom compilation step directly to the PC file.

转载请注明原文地址:https://www.9cbs.com/read-77068.html

New Post(0)