Caution When Declaring Variables and Routines Named 'connect' in a Pro*C or OCI Program
(Doc ID 158581.1)
Last updated on FEBRUARY 03, 2022
Applies to:
Precompilers - Version 8.1.7.4 and laterOracle Database - Enterprise Edition - Version 8.1.7.4 and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Linux x86
Oracle Solaris on x86 (32-bit)
Oracle Solaris on SPARC (64-bit)
Oracle Solaris on SPARC (32-bit)
HP Tru64 UNIX
Symptoms
Declaring a global variable 'connect' in a Pro*C or OCI program fools the linker on some platforms, as Solaris (Intel and Sparc), Linux, and Tru64, and causes a core dump if a remote tns connection is to be made.
e.g. test.pc:
might let the linker complain about redefinition of connect(), or just pass and produce the output:
from my_connect
Connected to Oracle.
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |