I am using the Java JNI API to call the native program in Pro*C on Sun Solaris. Hit problem below when compiling the shared lib to be used by Java.

Any help will be greatly appreciated. Thanks in advance.

-----------------------------------------------------------------
gcc -g -c ca_prt_err.c
gcc -g -c ca_log.c
proc sqlcheck=semantics userid=cmsuser/cmsuser@CSTMP dbms=v6 'sys_include=(RACLE
_HOME/precomp/public,/usr/java1.2/include/,/usr/java1.2/include/solaris,/usr/inc
lude)' iname=ca_stored_proc.pc

Pro*C/C++: Release 8.1.7.0.0 - Production on Wed Dec 31 11:58:45 2003

(c) Copyright 2000 Oracle Corporation. All rights reserved.

System default option values taken from: /cargoweb/oracle/precomp/admin/pcscfg.c
fg

PCC-W-02113, DBMS=V6 no longer supported; using DBMS=NATIVE, CHAR_MAP=VARCHAR2.
gcc -g -c Sqlerror_handler.c
gcc -g -I/usr/java1.2/include/ -I/usr/java1.2/include/solaris -o libsubmInsert.
so ca_stored_proc.c Sqlerror_handler.o sys_cal_dt.o sys_error.o sys_datn.o ora_e
rror.o ca_prt_err.o ca_prt_err_fx.o ca_log.o -L/cargoweb/oracle/lib/ -lclntsh
`cat /cargoweb/oracle/lib/sysliblist` -R/cargoweb/oracle/lib -laio -lm -lth
read
ca_stored_proc.c: In function `Java_CaSubmSP_invokeSQL':
ca_stored_proc.c:378: warning: assignment discards qualifiers from pointer targe
t type
ca_stored_proc.c:380: warning: assignment discards qualifiers from pointer targe
t type
ca_stored_proc.c:381: warning: assignment discards qualifiers from pointer targe
t type
ca_stored_proc.c:384: warning: assignment discards qualifiers from pointer targe
t type
ca_stored_proc.c:506: warning: return from incompatible pointer type
Undefined first referenced
symbol in file
main /opt/sfw/lib/gcc-lib/sparc-sun-solaris2.8/2.
95.2/crt1.o
ld: fatal: Symbol referencing errors. No output written to libsubmInsert.so
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `build1'