Building Static Application/Library Using Pro*C Includes Shared Library

(Doc ID 377651.1)

Last updated on JULY 05, 2017

Applies to:

Precompilers - Version and later
Information in this document applies to any platform.
***Checked for relevance on 25-Mar-2013***


Using Pro*C to generate static executable from demo "sampl10.pc" by using build_static option results in reference to shared library 

Use of ldd command will prove that the library is not static.


>cd $ORACLE_HOME/precomp/demo/proc

> make  -f build_static EXE=sample10 OBJS=sample10.o

>ls -l sample10*
-rwxr-xr-x 1 emtools emtools 21780672 Jul 11 08:19 sample10*
-rw-r--r-- 1 emtools emtools 45029 Jul 11 08:18 sample10.c
-rw-r--r-- 1 emtools emtools 23872 Jul 11 08:18 sample10.o
-rw-rw---- 1 emtools emtools 19286 May 16 2005 sample10.pc

> ldd sample10 => /usr/lib/64/ => $ORACLE_HOME/lib/        <---- Shared library ! => /usr/lib/64/ => /usr/lib/64/ => /usr/lib/64/ => /usr/lib/64/ => /usr/lib/64/ => /usr/lib/64/ => /usr/lib/64/ => /usr/lib/64/ => /usr/lib/64/ => /usr/lib/64/ => /usr/lib/64/


Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms