Question about libraries in Pro*C
Date: Tue, 20 Jul 1993 05:27:11 GMT
Message-ID: <ana.743146031_at_dapp>
Hello:
I have a question about libraries to be included when compiling a program in Pro*C. I am getting a problem with an Undefined _sqlcex. I figured out that it might be generated by a library linkage problem, but I am not certain about that. The problem is the following:
I have written a program in Pro*C that queries a few tables of an Oracle database. There are no updates or dynamic queries.
I would like to know which libraries I have to include to make my program work. I generate my .c program by using the precompiler and everything "seems" to be fine. The problem is when I compile the resulting .c file and then I get the following problem:
$ cc -o prueba.o prueba.c $ORACLE_HOME/proc/lib/libcgen.a $ORACLE_HOME/rdbms/lib/libora.a
ld: Undefined symbol
_sqlcex
for the Pro*C precompilation I used the following:
ireclen=132 oreclen=132 select_error=no
I must also say that I have compiled my program using the make file in the proc directory that comes with Oracle and everything works fine. However, I would like to understand why I am getting this problem when I do not use the make file. Not everything is fine with my make file; eventhough I do not get the problem when I use this make file (I get the .o, *, .c, and .lis files), the problem reappears later when I tried to link my .o function to another program, I get the same error as mentioned above.
I would like to know where this _sqlcex is obtained from and its use. If anyone has any idea of why I am getting this problem, I would really appreciate your help. Please respond by email.
-- email: ana_at_cs.ualberta.ca Ana Dominguez Department of Computing Science University of Alberta Edmonton, Alberta Canada T6G 2H1Received on Tue Jul 20 1993 - 07:27:11 CEST