【问题标题】:Unable to re-compile legacy Pro*C software in Redhat Linux with Oracle 12C无法使用 Oracle 12C 在 Redhat Linux 中重新编译旧版 Pro*C 软件
【发布时间】:2019-01-21 12:56:11
【问题描述】:

我们在 Pro*C 和一台装有 Red Hat Enterprise Linux Server 版本 7.5 (Maipo) 和 Oracle 12 C 的机器上都有代码,我们运行它没有错误:

proc SQLCHECK=SEMANTICS userid=letri/pruebas@desarrollo iname=carga_hr_fr include=. include=/usr/include include=/oracle/app/oracle/12.2.0/precomp/public include=/oracle/app/oracle/12.2.0/xdk/include include=/oracle/app/oracle/12.2.0/lib include=/oracle/app/oracle/12.2.0/lib include=/usr/lib/gcc/x86_64-redhat-linux/4.8.2/include/

cc -m64 -I. -I/usr/include -I/oracle/app/oracle/12.2.0/precomp/public -I/oracle/app/oracle/12.2.0/xdk/include -I/oracle/app/oracle/12.2.0/lib -I/oracle/app/oracle/12.2.0/lib -I/usr/lib/gcc/x86_64-redhat-linux/4.8.2/include/ -c carga_hr_fr.c

但是用这个命令生成可执行文件:

cc -o carga_hr_fr carga_hr_fr.o /oracle/app/oracle/12.2.0/lib/libxml12.a -L/oracle/app/oracle/12.2.0/lib -L/oracle/app/oracle/12.2.0/xdk/include -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/ -lm -lclntsh

它会产生错误:

/usr/bin/ld: /oracle/app/oracle/12.2.0/lib/libxml12.a(lpxsut.o): 对符号“lxgt2u”的未定义引用 /oracle/app/oracle/12.2.0/lib/libclntshcore.so.12.1:添加错误 符号:命令行collect2中缺少DSO:错误:ld返回1 退出状态

关于如何解决它的任何想法?

这是代码的标题:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sqlda.h>
#include <sqlcpr.h>

#ifndef ORAXML_ORACLE
#include <oraxml.h>
#endif

#define DEFAULT_KEYWORD "death"


/*********** Conexion a Oracle *************/
#include "lib/liboracle.h"
#define USERID   "dummy/something@development"

EXEC SQL INCLUDE sqlca;
/*****************************************/

【问题讨论】:

    标签: c oracle redhat oracle12c proc


    【解决方案1】:

    您可能需要将 -lnls12 添加到最后 cc 行。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多