Trying to build Static Pro*C Application Gives Undefined Reference To `Sqlcxt' ,`Sqlglm' Sql_error (Doc ID 386710.1)

Last updated on JULY 05, 2017

Applies to:

Precompilers - Version 10.2.0.1 and later
Information in this document applies to any platform.
***Checked for relevance on 7th Jul 2016***

Symptoms

Using Pro*C  to build static applications - for example sample1.pc

make -f $ORACLE_HOME/precomp/demo/proc/demo_proc.mk build_static OBJS=sample1.o EXE=sample1

result in unresolved references:

sample1.o(.text+0x3b6): In function `main':
: warning: the `gets' function is dangerous and should not be used.
sample1.o(.text+0x49): In function `sql_error':
: undefined reference to `sqlglm'
sample1.o(.text+0xe6): In function `sql_error':
: undefined reference to `sqlcxt'
sample1.o(.text+0x337): In function `main':
: undefined reference to `sqlcxt'
sample1.o(.text+0x61c): In function `main':
: undefined reference to `sqlcxt'
sample1.o(.text+0x789): In function `main':
: undefined reference to `sqlcxt'
collect2: ld returned 1 exit status
make: *** [build_static] Error 1

Cause

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