Carlos P.
Carlos P.

Reputation: 31

Unable to re-compile legacy Pro*C software in Redhat Linux with Oracle 12C

We have code in Pro*C and in a machine with Red Hat Enterprise Linux Server release 7.5 (Maipo) and Oracle 12 C we have run this without errors:

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

But generating the executable with this command:

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

it generates the error:

/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

Any ideas about how to solve it?

This is the header of the code:

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

Upvotes: 3

Views: 723

Answers (1)

Peter Colman
Peter Colman

Reputation: 11

You probably need to add -lnls12 to the last cc line.

Upvotes: 1

Related Questions