Caution When Declaring Variables and Routines Named 'connect' in a Pro*C or OCI Program
(Doc ID 158581.1)
Last updated on DECEMBER 23, 2019
Applies to:Precompilers - Version 22.214.171.124 and later
Oracle Database - Enterprise Edition - Version 126.96.36.199 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
Oracle Solaris on x86 (32-bit)
Oracle Solaris on SPARC (64-bit)
Oracle Solaris on SPARC (32-bit)
HP Tru64 UNIX
***Checked for relevance on 22-Oct-2013***
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.
might let the linker complain about redefinition of connect(), or just pass and produce the output:
Connected to Oracle.
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!