c - 无法使用 Oracle 12C 在 Redhat Linux 中重新编译遗留 Pro*C 软件

标签 c oracle redhat oracle12c proc

我们在 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): undefined reference to symbol 'lxgt2u' /oracle/app/oracle/12.2.0/lib/libclntshcore.so.12.1: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status

有什么解决办法吗?

这是代码的标题:

#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;
/*****************************************/

最佳答案

您可能需要将 -lnls12 添加到抄送的最后一行。

关于c - 无法使用 Oracle 12C 在 Redhat Linux 中重新编译遗留 Pro*C 软件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54290513/

相关文章:

php - SQL:如何插入自定义增量值

oracle - 如何同步和优化Oracle Text索引?

oracle - 当 Oracle 表中不存在该行时,使用 IN 条件返回该行

git - 建立主机 'nodejs-xxxxx.rhcloud.com can'的真实性

c - 为什么使用 & 符号来检索整数的内存地址,而不是函数的地址?

c - 在为子进程中的信号处理程序提供服务后,通知父进程有关子进程的信号

c - 在 Redhat 上安装 HAWQ

cassandra - 无法在 Red Hat 7/CentOS 7 上安装 Apache Cassandra 4.0.5

c - 声明循环变量的好习惯是什么?

c - 尝试释放 int 指针数组时出现 valgrind 错误。不知道为什么