Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> PLEASE HELP: Linking Pro*C App under RedHat 52 & Oracle 805
I cannot for the life of me figure out how and what library I need to link using Oracle's Pro*C/C++.
I have a simple C program that has embedded SQL that makes a very simple query to the database and displays the results to stdout. It precompiles fine with Oracle's precompiler, proc. I then proceed to compile the resulting source file with GCC 2.7.2.3, and it complains about undefined references to the below listed call. (I know this is a library I need to link, but I do not know which one, or if I am correctly linking it at all)
Here are the compiler messages:
/tmp/cca152341.o: In function `main':
/tmp/cca152341.o(.text+0x1bf): undefined reference to `sqlcxt'
/tmp/cca152341.o(.text+0x3a4): undefined reference to `sqlcxt'
/tmp/cca152341.o(.text+0x445): undefined reference to `sqlcxt'
Can someone show me the exact syntax to compile and link to the correct library using GCC? (All documentation I have look at generically refer to this library as LIBSQL)
Any help is greatly appreciated, also if you know of any good books out there covering Pro*C/C++, OCI, and PL/SQL I would appreciate it as well.(I have all the books by Osborne Press)
Thanks,
Chuck
Received on Sat Apr 17 1999 - 15:57:20 CDT