⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ch4_comp.htm

📁 Debian中文参考手册,系统介绍了Debian系统
💻 HTM
📖 第 1 页 / 共 5 页
字号:
</table>
</li>
</ol>
<br /><strong><font face="arial, helvetica, sans-serif">Building 32-Bit Pro&#042;C and OCI Customer Applications
</font></strong><br />
<p>Oracle9<em>i</em> release 2 (9.2.0.1.0) supports both 32-bit and 64-bit Pro&#042;C and Oracle Call Interface (OCI) customer applications. 
</p>
<div align="center">
<br /><table summary="This is a layout table to format a note" title="This is a layout table to format a note" dir="ltr" border="1" width="80%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0"><tbody>
<tr>
<td align="left" colspan="1" rowspan="1">
<p>
<font face="arial, helvetica, sans-serif">
<strong>See Also:</strong>
</font>
</p><code>&#036;ORACLE&#095;HOME&#047;precomp&#047;demo&#047;demo&#095;proc.mk</code> and <code>&#036;ORACLE&#095;HOME&#047;precomp&#047;demo&#047;demo&#095;proc32.mk</code> files for information on building 32-bit Pro&#042;C applications.
<p>See the <code>&#036;ORACLE&#095;HOME&#047;rdbms&#047;demo&#047;demo&#095;rdbms.mk</code> and <code>&#036;ORACLE&#095;HOME&#047;rdbms&#047;demo&#047;demo&#095;rdbms32.mk</code> files for information on building 32-bit Pro&#042;C applications.
</p>
</td>
</tr></tbody>
</table><br />
</div>
<br /><strong><font face="arial, helvetica, sans-serif">32-Bit Executables and Directories (AIX and HP Only)
</font></strong><br />
<p>In Oracle9<em>i</em> release 2 (9.2.0.1.0) for HP and AIX systems, the following directories contain 32-bit executables and libraries: 
</p>
<ul>
<li type="disc">
<p><code>&#036;ORACLE&#095;HOME&#047;lib32</code> 
</p>
</li>
<li type="disc">
<p><code>&#036;ORACLE&#095;HOME&#047;rdbms&#047;lib32</code>
</p>
</li>
<li type="disc">
<p><code>&#036;ORACLE&#095;HOME&#047;hs&#047;lib32</code> 
</p>
</li>
<li type="disc">
<p><code>&#036;ORACLE&#095;HOME&#047;network&#047;lib32</code>
</p>
</li>
<li type="disc">
<p><code>&#036;ORACLE&#095;HOME&#047;precomp&#047;lib32</code>
</p>
</li>
<li type="disc">
<p><code>&#036;ORACLE&#095;HOME&#047;bin</code>
</p>
</li>
</ul>
</div class="sect1"><a id="i33246" name="i33246"></a>
<div class="sect1">
<!--
infolevel=all
infotype=general
--><a id="sthref480" name="sthref480"></a>
<h2>
<font face="arial, helvetica, sans-serif" color="#330099">Pro&#042;C&#047;C&#043;&#043; Precompiler<a id="sthref481" name="sthref481"></a><a id="sthref482" name="sthref482"></a>
</font>
</h2>
<p>Before you use the Pro&#042;C&#047;C&#043;&#043; precompiler, verify that the correct version of the operating system compiler is properly installed. 
</p>
<div align="center">
<br /><table summary="This is a layout table to format a tip" title="This is a layout table to format a tip" dir="ltr" border="1" width="80%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0"><tbody>
<tr>
<td align="left" colspan="1" rowspan="1">
<p>
<font face="arial, helvetica, sans-serif">
<strong><strong>See Also</strong>:</strong>
</font>
</p><em>Oracle9i Installation Guide Release 2 (9.2.0.1.0) for UNIX Systems</em> for information on the required compiler versions on each platform, and the <em>Pro&#042;C&#047;C&#043;&#043; Precompiler Programmer&#039;s Guide for additional information on the Pro&#042;C&#047;C&#043;&#043; precompiler and interface features.</em>
</td>
</tr></tbody>
</table><br />
</div>
<div class="sect2">
<!--
infolevel=all
infotype=general
--><a id="sthref483" name="sthref483"></a>
<h3>
<font face="arial, helvetica, sans-serif" color="#330099">
Pro&#042;C&#047;C&#043;&#043; Demonstration Programs<a id="sthref484" name="sthref484"></a><a id="sthref485" name="sthref485"></a>
</font>
</h3>
<p>Demonstration programs are provided to show the features of the Pro&#042;C&#047;C&#043;&#043; precompiler. There are three types of demonstration programs: C, C&#043;&#043;, and Object programs. Object programs demonstrate the new Oracle9<em>i</em> Object features. All of the demonstration programs are located in the <code>&#036;ORACLE&#095;HOME&#047;precomp&#047;demo&#047;proc</code> directory. By default, all programs are dynamically linked with the client shared library.
</p>
<p>The programs assume that the demonstration tables created by the <code>&#036;ORACLE&#095;HOME&#047;sqlplus&#047;demo&#047;demobld.sql</code> script exist in the SCOTT schema with the password TIGER.
</p>
<p>Use the <code>demo&#095;proc.mk</code> <a id="sthref486" name="sthref486"></a>make file, located in the <code>&#036;ORACLE&#095;HOME&#047;precomp&#047;demo&#047;proc&#047;</code> directory, to create the demonstration programs. For example, to precompile, compile, and link the <code>sample1</code> demonstration program, enter the following command:
</p>
<pre>&#036; make -f demo&#095;proc.mk sample1

</pre>
<p>To create all of the C demonstration programs for Pro&#042;C&#047;C&#043;&#043;, enter: 
</p>
<pre>&#036; make -f demo&#095;proc.mk samples

</pre>
<p>To create all of the C&#043;&#043; demonstration programs for Pro&#042;C&#047;C&#043;&#043;, enter: 
</p>
<pre>&#036; make -f demo&#095;proc.mk cppsamples

</pre>
<p>To create all of the Object demonstration programs for Pro&#042;C&#047;C&#043;&#043;, enter: 
</p>
<pre>&#036; make -f demo&#095;proc.mk object&#095;samples

</pre>
<p>Some demonstration programs require you to run a SQL script, located in the <code>&#036;ORACLE&#095;HOME&#047;precomp&#047;demo&#047;sql</code> directory. If you do not run the script, a message displays requesting you to run it. To build a demonstration program and run the corresponding SQL script, include the <code>make</code> macro argument <code>RUNSQL&#061;run</code> on the command line. For example, to create the <code>calldemo</code> demonstration program and run the required <code>&#036;ORACLE&#095;HOME&#047;precomp&#047;demo&#047;sql&#047;calldemo.sql</code> script, enter:
</p>
<pre>&#036; make -f demo&#095;proc.mk calldemo RUNSQL&#061;run

</pre>
<p>To create all of the Object demonstration programs and run all corresponding required SQL scripts, enter:
</p>
<pre>&#036; make -f demo&#095;proc.mk object&#095;samples RUNSQL&#061;run
</pre>
</div class="sect2">
<div class="sect2">
<!--
infolevel=all
infotype=general
--><a id="sthref487" name="sthref487"></a>
<h3>
<font face="arial, helvetica, sans-serif" color="#330099">
Pro&#042;C&#047;C&#043;&#043; User Program
</font>
</h3>
<p>You can use the <code>&#036;ORACLE&#095;HOME&#047;precomp&#047;demo&#047;proc&#047;demo&#095;proc.mk</code> make file to create user programs. The syntax for creating a program with the <code>demo&#095;proc.mk</code> make file is:
</p>
<pre>&#036; make -f demo&#095;proc.mk <em>target</em> OBJS&#061;"<em>objfile1</em> <em>objfile2</em> ..." EXE&#061;<em>exename</em>

</pre>
<p>In the preceding example:
</p>
<ul>
<li type="disc">
<p><em><code>target</code></em> is the make file target that you want to use 
</p>
</li>
<li type="disc">
<p><em><code>objfilen</code></em> is the object file to link the program
</p>
</li>
<li type="disc">
<p><em><code>exename</code></em> is the executable program
</p>
</li>
</ul>
<p>For example, to create the program <code>myprog</code> from the Pro&#042;C&#047;C&#043;&#043; source file <code>myprog.pc</code>, enter one of the following commands, depending on the source and the type of executable you want to create.
</p>
<ul>
<li type="disc">
<p>For C source, dynamically linked with the client shared library, enter:
</p>
<pre>&#036; make -f demo&#095;proc.mk build OBJS&#061;myprog.o EXE&#061;myprog

</pre>
</li>
<li type="disc">
<p>For C source, statically linked, enter:
</p>
<pre>&#036; make -f demo&#095;proc.mk build&#095;static OBJS&#061;myprog.o EXE&#061;myprog

</pre>
</li>
<li type="disc">
<p>For C&#043;&#043; source, dynamically linked with the client shared library, enter:
</p>
<pre>&#036; make -f demo&#095;proc.mk cppbuild OBJS&#061;myprog.o EXE&#061;myprog

</pre>
</li>
<li type="disc">
<p>For C&#043;&#043; source, statically linked, enter:
</p>
<pre>&#036; make -f demo&#095;proc.mk cppbuild&#095;static OBJS&#061;myprog.o EXE&#061;myprog

</pre>
<br /><table summary="This is a layout table to format a note" title="This is a layout table to format a note" dir="ltr" border="1" width="80%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0"><tbody>
<tr>
<td align="left" colspan="1" rowspan="1">
<p>
<font face="arial, helvetica, sans-serif">
<strong>Note:</strong>
</font>
</p>On AIX, HP, and Solaris 64-bit systems, the <code>demo&#095;proc.mk</code> make file builds 64-bit user programs by default. You can also use the <code>demo&#095;proc32.mk</code> make file to build 32-bit user programs. See the make file for more information on creating 32-bit user programs.
</td>
</tr></tbody>
</table><br />
</li>
</ul>
</div class="sect2">
</div class="sect1"><a id="i36455" name="i36455"></a>
<div class="sect1">
<!--
infolevel=all
infotype=general
--><a id="sthref488" name="sthref488"></a>
<h2>
<font face="arial, helvetica, sans-serif" color="#330099">Pro&#042;COBOL Precompiler<a id="sthref489" name="sthref489"></a><a id="sthref490" name="sthref490"></a> (AIX, HP, Solaris, and Tru64 Only)
</font>
</h2>
<p>There are two versions of Pro&#042;COBOL included with this release. <a href="#g39948">Table 4-4</a> shows the naming conventions for each version.
</p><a id="sthref491" name="sthref491"></a><a id="g39948" name="g39948"></a>
<p><strong><em><font face="arial, helvetica, sans-serif">Table 4-4 Pro&#042;COBOL Naming Conventions <a id="sthref492" name="sthref492"></a>
</font></em></strong></p>
<table title="Pro COBOL Naming Conventions " summary="This table lists the Pro*COBOL naming differences." dir="ltr" border="1" width="100%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0">
<thead>
<tr align="left" valign="top">
<th id="r1c1" align="left" colspan="1" rowspan="1" valign="bottom">
<font face="Arial, Helvetica, sans-serif">
<strong>Item
</strong></font></th>
<th id="r1c2" align="left" colspan="1" rowspan="1" valign="bottom">
<font face="Arial, Helvetica, sans-serif">
<strong>Pro&#042;COBOL Release 9.2.0.1.0
</strong></font></th>
<th id="r1c3" align="left" colspan="1" rowspan="1" valign="bottom">
<font face="Arial, Helvetica, sans-serif">
<strong>Pro&#042;COBOL Release 1.8.77.0.0
</strong></font></th>
</tr>
</thead><tbody>
<tr align="left" valign="top">
<td id="r2c1" headers="r1c1" align="left" colspan="1" rowspan="1">Executable
</td>
<td headers="r2c1 r1c2" align="left" colspan="1" rowspan="1"><code>procob</code>
</td>
<td headers="r2c1 r1c3" align="left" colspan="1" rowspan="1"><code>procob18</code>
</td>
</tr>
<tr align="left" valign="top">
<td id="r3c1" headers="r1c1" align="left" colspan="1" rowspan="1">Demonstration Directory
</td>
<td headers="r3c1 r1c2" align="left" colspan="1" rowspan="1"><code>procob2</code>
</td>
<td headers="r3c1 r1c3" align="left" colspan="1" rowspan="1"><code>procob</code>
</td>
</tr>
<tr align="left" valign="top">
<td id="r4c1" headers="r1c1" align="left" colspan="1" rowspan="1">Make file for Merant Server Express COBOL
</td>
<td headers="r4c1 r1c2" align="left" colspan="1" rowspan="1"><code>demo&#095;procob.mk</code>
</td>
<td headers="r4c1 r1c3" align="left" colspan="1" rowspan="1"><code>demo&#095;procob18.mk</code>
</td>
</tr></tbody>
</table>
<p>Pro&#042;COBOL supports statically linked, dynamically linked, or dynamically loadable programs. Dynamically linked programs use the client shared library. Dynamically loadable programs use the <code>rtsora</code> executable located in the <code>&#036;ORACLE&#095;HOME&#047;bin</code> directory.
</p>
<div class="sect2">
<!--
infolevel=all
infotype=general
--><a id="sthref493" name="sthref493"></a>
<h3>
<font face="arial, helvetica, sans-serif" color="#330099">
<a id="i32437" name="i32437"></a><code></code>Pro&#042;COBOL Environment Variables
</font>
</h3>
<p>This section describes the environment variables required by Pro&#042;COBOL.
</p>
<div class="sect3">
<!--
infolevel=all
infotype=general
--><a id="sthref494" name="sthref494"></a>
<h4>
<font face="arial, helvetica, sans-serif" color="#330099">
Merant Server Express COBOL Compiler<a id="sthref495" name="sthref495"></a><a id="sthref496" name="sthref496"></a><a id="sthref497" name="sthref497"></a>
</font>
</h4>
<p>For the Merant Server Express COBOL compiler, you must set the COBDIR environment variable and the LD&#095;LIBRARY&#095;PATH, LIBPATH, or SHLIB&#095;PATH environment variable, depending on your operating system.
</p>
<br /><strong><font face="arial, helvetica, sans-serif">COBDIR
</font></strong><br />
<p>Set the COBDIR environment variable to the directory where the compiler is installed. For example, if the compiler is installed in the <code>&#047;opt&#047;cobol</code> directory, enter:
</p>
<pre>&#036; COBDIR&#061;&#036;&#123;COBDIR&#125;:&#036;&#047;opt&#047;cobol 
&#036; export COBDIR

</pre>
<br /><strong><font face="arial, helvetica, sans-serif">LD&#095;LIBRARY&#095;PATH (Solaris and HP with 64-Bit Applications Only)
</font></strong><br />
<p>Set the LD&#095;LIBRARY&#095;PATH environment variable to the directory where the compiler is installed. For example, if the compiler is installed in the <code>&#036;COBDIR&#047;coblib</code> directory, enter:
</p>
<pre>&#036; LD&#095;LIBRARY&#095;PATH&#061;&#036;&#123;LD&#095;LIBRARY&#095;PATH&#125;:&#036;COBDIR&#047;coblib
&#036; export LD&#095;LIBRARY&#095;PATH

</pre>
<br /><strong><font face="arial, helvetica, sans-serif">LIBPATH (AIX only)
</font></strong><br />
<p>Set the LIBPATH environment variable to the directory where the compiler is installed. For example, if the compiler is installed in the &#036;COBDIR&#047;coblib directory, enter:
</p>
<pre><code>&#036; LIBPATH&#061;&#036;&#123;LIBPATH&#125;</code>:&#036;COBDIR&#047;coblib
&#036; export<code> LIBPATH</code>

</pre><a id="CHDFCFDJ" name="CHDFCFDJ"></a>
<br /><strong><font face="arial, helvetica, sans-serif">SHLIB&#095;PATH (HP with 32-Bit Applications)
</font></strong><br />
<p>Set the SHLIB&#095;PATH environment variable to the directory where the compiler is installed. For example, if the compiler is installed in the &#036;COBDIR&#047;coblib directory, enter:
</p>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -