By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,322 Members | 1,182 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,322 IT Pros & Developers. It's quick & easy.

undefined reference to `sqlcxt' (Pro C compilation problem)

P: n/a
Greetings to all
I am new to ProC. I am compiling a very simple program written in
ProC. I can compile the program using proc filename.pc and it
generates the corresponding c code :) , but when i try to compile the
C program using

cc -O3 -DPRECOMP -I. -I/opt/oracle/products/9.2.0/rdbms/public
-I/opt/oracle/products/9.2.0/network/public -DLINUX -D_GNU_SOURCE
-L /opt/oracle/products/9.2.0/precomp/lib/ -L
/opt/oracle/products/9.2.0/lib/ -L
/opt/oracle/products/9.2.0/lib/stubs/ filename.c -ldl -lm -lpthread
-lnsl -o filename

the result is an error reporting LIKE THIS

filename.c: In function `main':
filename.c:152: warning: return type of `main' is not `int'
/tmp/ccoa0TeD.o: In function `main':
/tmp/ccoa0TeD.o(.text+0x143): undefined reference to `sqlcxt'
/tmp/ccoa0TeD.o(.text+0x2e9): undefined reference to `sqlcxt'
collect2: ld returned 1 exit status

I also tried using
make -f /opt/oracle/products/9.2.0/precomp/demo/proc/
filename, but here also unfortunately same situation.

Can any one have any idea what can be done??? Thanx in advance.
Jul 19 '05 #1
Share this Question
Share on Google+
2 Replies

P: n/a
Hi Ferdous,

i assume, yourŽe compiling on Unix/Linux.
sqlcxt is an external variable defined in
Just compile with "-L $(ORACLE_HOME)/lib -l clntsh" and it should
work. itself is created at install time by the shell script

Regs, Lothar
Jul 19 '05 #2

P: 1
Explicitely give the library name in the command line

gcc $ORACLE_HOME/lib/ [...] filename.c
Feb 20 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.