Re: Can't compile C file generated by Pro*C/C++
Date: Thu, 20 Jan 2000 14:59:44 +0100
Message-ID: <388714D0.BDAC1D44_at_adicom.de>
Its in one of the Oracle libs (shared + static libs). You must play with the sequence of the library names in your makefile. Here is an example which works
include $(ORACLE_HOME)/precomp/lib/env_precomp.mk
INCLUDE = -I. \
-I$(ORACLE_HOME)/precomp/public
SYSLIBS = -ldl -lncurses -lm -lm -lc -lpthread -lstdc++
LIBS = $(SYSLIBS) $(PROLDLIBS)
STATICPROLDLIBS=$(SCOREPT) $(SSCOREED) $(DEF_ON) $(LLIBCLIENT) $(LLIBSQL)
$(STATICTTLIBS)
PROLDLIBS= /usr/orarun/precomp/lib/libproc2.a \
/usr/orarun/lib/libslax.a /usr/orarun/precomp/lib/libpgp.a \ /usr/orarun/precomp/lib/libots2c.a -lplsb -lextp \ /usr/orarun/lib/libclntsh.so \
`cat /usr/orarun/lib/naldflgs` -lnetv2 -lnttcp \
-lnetwork -lncr -lnetv2 -lnttcp -lnetwork -lclient -lvsn -lcommon \ -lgeneric -lmm -lnlsrtl3 -lcore4 -lnlsrtl3 -lcore4 -lnlsrtl3 -lnetv2 \ -lnttcp -lnetwork -lncr -lnetv2 -lnttcp -lnetwork -lclient -lvsn \ -lcommon -lgeneric -lplsf -lplsb -lextp -lepc -lnlsrtl3 -lcore4 \ -lnlsrtl3 -lcore4 -lnlsrtl3 -lclient -lvsn -lcommon -lgeneric \ -lnlsrtl3 -lcore4 -lnlsrtl3 -lcore4 -lnlsrtl3 \`cat /usr/orarun/lib/sysliblist`
LDFLAGS = -L/usr/lib/gcc-lib/i486-linux/egcs-2.91.60 -L$(ORACLE_HOME)/lib
gcc $(LDFLAGS) -o $(APPNAME) $(OBJECTS) $(LIBS) $(PROLDLIBS)
Nicolas Roux wrote:
> I'm working under Linux and with Oracle 8i.
>
> My problem is that I can't compile my C file which was generated by the
> Pro*C/C++ .
> It returns this error :
>
> -> undefined reference to 'sqlcxt(void **, unsigned int *, sqlexd,
> sqlcxp const*)'
> -> collect2 : ld returned 1 exit status
>
> sqlcxt is an extern function generated by pro*C/C++. I can't find this
> function in Oracle's libraries.
> What must I do?
>
> Thanks!
-- ------------------------------------- ADICOM Informatik GmbH Andreas Michler Wiesfleckenstr. 34 72336 Balingen Tel: 07433/9977-57,Fax: -90 E-Mail: Andreas.Michler_at_adicom.de http:\\www.adicom.de -------------------------------------Received on Thu Jan 20 2000 - 14:59:44 CET
