Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Compile a Pro*C program
In our last gripping episode Peter Sylvester <peters_at_mitre.org> wrote:
> From the error message, looks like you don't have a main() function
> defined, or you haven't linked the module containing it.
>
> Debugging Pro*C is pretty much the same as debuging C, except you may
> have to step around some of the generated code, which can get ugly.
>
> -Peter
>
> Guo zhenfeng wrote:
> >
> > When I compile a pro*c program,it fails,here is the information
in
> > compile,Please help to find what's the matter.Two thing to say:
> > 1.The mytest.pc is copy from the samples from oracle.
> > 2.When i mv mytest.pc to sample1.pc it work fine.:
> >
> > mytest.pc is my code,demo_proc.mk is the makefile comes with oracle,
> >
> > /**********************************************
> > make -f demo_proc.mk build OBJ=mytest.o EXE=mytest
> >
> > cc -o mytest -L/u01/app/oracle/product/8.1.5/lib/ -lclntsh -
lclient8
> > /u01/app/oracle/product/8.1.5/lib/libsql8.a
> > /u01/app/oracle/product/8.1.5/lib/scorept.o
> > /u01/app/oracle/product/8.1.5/lib/sscoreed.o
> > /u01/app/oracle/product/8.1.5/rdbms/lib/kpudfo.o
> > /u01/app/oracle/product/8.1.5/lib/nautab.o
> > /u01/app/oracle/product/8.1.5/lib/naeet.o
> > /u01/app/oracle/product/8.1.5/lib/naect.o
> > /u01/app/oracle/product/8.1.5/lib/naedhs.o `cat
> > /u01/app/oracle/product/8.1.5/network/lib/ldflags` -ln8 -lnl8 -
lnro8
> >
> > `cat /u01/app/oracle/product/8.1.5/network/lib/ldflags` -ln8 -
lnl8
> > -lclient8 -lvsn8 -lcommon8 -lskgxp8 -lgeneric8 -lmm -lnls8 -lcore8
> > -lnls8 -lcore8 -lnls8 `cat
> > /u01/app/oracle/product/8.1.5/network/lib/ldflags` -ln8 -lnl8 -
lnro8
> >
> > `cat /u01/app/oracle/product/8.1.5/network/lib/ldflags` -ln8 -
lnl8
> > -lclient8 -lvsn8 -lcommon8 -lskgxp8 -lgeneric8
> > /u01/app/oracle/product/8.1.5/lib/libpls8.a
> > /u01/app/oracle/product/8.1.5/lib/libplp8.a
> > /u01/app/oracle/product/8.1.5/lib/libpls8.a -ltrace8 -lnls8 -lcore8
> > -lnls8 -lcore8 -lnls8 -lclient8 -lvsn8 -lcommon8 -lskgxp8 -
lgeneric8
> > -lnls8 -lcore8 -lnls8 -lcore8 -lnls8 `cat
> > /u01/app/oracle/product/8.1.5/lib/sysliblist` -lc -lm
> > /usr/lib/crt1.o(.text+0x18): undefined reference to `main'
> > collect2: ld returned 1 exit status
> > make: *** [build] Error 1
> > *************************/
> >
> > Another,can you tell me things about debug the pro*c program?
> > Many thanks !
> > Guo 2000/12/14
>
You probably need to copy the makefile entries for sample1.pc as entries for mytest.pc.
-- David Fitzjarrell Oracle Certified DBA Sent via Deja.com http://www.deja.com/Received on Tue Dec 19 2000 - 09:49:31 CST