gpt4 book ai didi

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

转载 作者:太空宇宙 更新时间:2023-11-04 04:13:42 25 4
gpt4 key购买 nike

我们在 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com