Hi, I have been doing some investigation to connecting an Oracle 8.1 database with a C application. I've installed cygwin with gcc3.3.1 and want to use OCI to connect to my local Oracle database on a Windows 2000 machine.

Unfortunately, I'm having some trouble compiling the sample programs that come with oracle installation:

gcc oci02.c -I c:/oracle/ora81/oci/include -o oci02

The errors are:
/cygdrive/c/DOCUME~1/ADMIN/LOCALS~1/Temp/ccDmHAES.o(.text+0x26f):oci02.c: undefined reference to `_oopen'
/cygdrive/c/DOCUME~1/ADMIN/LOCALS~1/Temp/ccDmHAES.o(.text+0x2b8):oci02.c: undefined reference to `_oparse'
/cygdrive/c/DOCUME~1/ADMIN/LOCALS~1/Temp/ccDmHAES.o(.text+0x328):oci02.c: undefined reference to `_obndrn'
/cygdrive/c/DOCUME~1/ADMIN/LOCALS~1/Temp/ccDmHAES.o(.text+0x3a8):oci02.c: undefined reference to `_odefin'
/cygdrive/c/DOCUME~1/ADMIN/LOCALS~1/Temp/ccDmHAES.o(.text+0x428):oci02.c: undefined reference to `_odefin'
/cygdrive/c/DOCUME~1/ADMIN/LOCALS~1/Temp/ccDmHAES.o(.text+0x4a8):oci02.c: undefined reference to `_odefin'
/cygdrive/c/DOCUME~1/ADMIN/LOCALS~1/Temp/ccDmHAES.o(.text+0x51d):oci02.c: undefined reference to `_oexec'
/cygdrive/c/DOCUME~1/ADMIN/LOCALS~1/Temp/ccDmHAES.o(.text+0x559):oci02.c: undefined reference to `_ofetch'
/cygdrive/c/DOCUME~1/ADMIN/LOCALS~1/Temp/ccDmHAES.o(.text+0x6ed):oci02.c: undefined reference to `_oerhms'
/cygdrive/c/DOCUME~1/ADMIN/LOCALS~1/Temp/ccDmHAES.o(.text+0x890):oci02.c: undefined reference to `_olog'
/cygdrive/c/DOCUME~1/ADMIN/LOCALS~1/Temp/ccDmHAES.o(.text+0x8fb):oci02.c: undefined reference to `_oclose'
/cygdrive/c/DOCUME~1/ADMIN/LOCALS~1/Temp/ccDmHAES.o(.text+0x92f):oci02.c: undefined reference to `_ologof'
collect2: ld returned 1 exit status

I'm not sure if I'm going down the correct path to connect C with Oracle. I want to ask anyone with experience for some advice on Oracle database connection in C.

Thanks.