Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: symbol referencing errors while statically linking

Re: symbol referencing errors while statically linking

From: Mike Krolewski <mkrolewski_at_rii.com>
Date: Sat, 23 Dec 2000 15:46:23 GMT
Message-ID: <922hce$94t$1@nnrp1.deja.com>

In article <3A444045.19FB7E73_at_yahoo.com>,   Daniel <dlrubinANTI-SPAM_at_yahoo.com> wrote:
> I'm trying to statically link the oracle libraries in my pro*c
> application, and I'm using the demo_proc.mk example from the oracle
> directory. I've got LD_LIBRARY_PATH set to $ORACLE_HOME/lib and
 here's
> my link line:
>
> $(C++) -o $(EXE) $(OBJS) -L$(LIBHOME) $(STATICCPPLDLIBS)
>
> And when I run it, I get these errors:
>
> Undefined first referenced
> symbol in file
> naeeta
> /usr/pubsw/apps/oracle/8.1.6/lib//libn8.a(nae.o)
> naeetc
> /usr/pubsw/apps/oracle/8.1.6/lib//libn8.a(nae.o)
> naeeti
> /usr/pubsw/apps/oracle/8.1.6/lib//libn8.a(nae.o)
> naeetn
> /usr/pubsw/apps/oracle/8.1.6/lib//libn8.a(nae.o)
> cgiOpen SubmitData.o
> cgiFirst SubmitData.o
> cgiSafeValue SubmitData.o
> naedhpk
> /usr/pubsw/apps/oracle/8.1.6/lib//libn8.a(nae.o)
> cgiNext SubmitData.o
> naeetcu
> /usr/pubsw/apps/oracle/8.1.6/lib//libn8.a(naeu.o)
> naeetau
> /usr/pubsw/apps/oracle/8.1.6/lib//libn8.a(naeu.o)
> naeetnu
> /usr/pubsw/apps/oracle/8.1.6/lib//libn8.a(naeu.o)
> nautab
> /usr/pubsw/apps/oracle/8.1.6/lib//libn8.a(nau.o)
> naecta
> /usr/pubsw/apps/oracle/8.1.6/lib//libn8.a(nae.o)
> naectc
> /usr/pubsw/apps/oracle/8.1.6/lib//libn8.a(nae.o)
> naecti
> /usr/pubsw/apps/oracle/8.1.6/lib//libn8.a(nae.o)
> naectn
> /usr/pubsw/apps/oracle/8.1.6/lib//libn8.a(nae.o)
> naedhsk
> /usr/pubsw/apps/oracle/8.1.6/lib//libn8.a(nae.o)
> naedhp
> /usr/pubsw/apps/oracle/8.1.6/lib//libn8.a(nae.o)
> nautabnum
> /usr/pubsw/apps/oracle/8.1.6/lib//libn8.a(nau.o)
> ld: fatal: Symbol referencing errors. No output written to SubmitData
>
> Any suggestions?
>
> Thanks.
> Daniel
> --
> To reply to me directly, please remove "ANTISPAM" from the reply-to
> email address.
>
>

Not enough information to determine the problem. You need to state the OS and compiler that you are using. I would need to see the complete make file.

Your basic problem is that you do not have enough libraries in the library list eg the cgi* references. If you are using UNIX (almost any flavor), the Oracle library list is very complex with multiple references to the same library due to cyclic reference to objects. Locate the example(s) makefiles eg make.mk or makefile.mk or <something>.mk and duplicate the large list of objects. Most of them are needed in the final assembly.

If you are working in the PC environment, the library is generally SQLLIB. The library is located in one of two directories depending on the compiler used.

If you are still getting errors like above after fixing this, you are having a generic C/C++ error of lacking a library for a function. Look up the function that you think is in that object/library ie from above a cgi function. Your manual should list the specific library that the function is in and make sure that the library is in your makefile/library list.

In general, in the UNIX environment, the -L path should exist for (1) the general compiler library paths; (2) Oracle library; and (3) specialized libraries. It is unlikely that your sysadmin installed Oracle or its library in the same directory as the compiler. In addition, some compilers have more than one directory of libraries eg gnu has one for standard libraries and another for STL libraries.

Michael Krolewski
Rosetta Inpharmatics
mkrolewski_at_rii.com

              Usual disclaimers

Sent via Deja.com
http://www.deja.com/ Received on Sat Dec 23 2000 - 09:46:23 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US