Languages and Scripting

Error compiling pro*c thru make in HP-UX

 
SOLVED
Go to solution
hpuserhk
Frequent Advisor

Error compiling pro*c thru make in HP-UX

Hello friends,
i am compling pro*c in HP-UX with oracle
backend getting following errors,pl help:

Pro*C/C++: Release 9.2.0.4.0 - Production on Tue Apr 3 10:48:45 2007

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

System default option values taken from: /opt/oracle/product/ora92/precomp/admin
/pcscfg.cfg

: C compiler
/usr/ccs/bin/ld: Unsatisfied symbols:
xu_freeall (first referenced in tapin.o) (code)
xd_setp (first referenced in tapin.o) (code)
xu_perror (first referenced in tapin.o) (code)
asn1D_DataInterChange (first referenced in tapin.o) (code)
xcc@ : Compilation Error! ./tapin.c -o ./tapin.exe -I/opt/oracle/product/ora92/p
recomp/public -I/opt/oracle/product/ora92/rdbms/public -I/opt/oracle/product/ora
92/plsql/public -I/opt/oracle/product/ora92/network/public -L/opt/oracle/product
/ora92/lib32 -lclntsh -lnbeq9 -lnhost9 -lnus9 -lnldap9 -lldapclnt9 -lnsslb9 -lno
name9 -lntcp9 -lntcps9 -lnsslb9 -lntcp9 -lntns9 -l:libcl.sl -l:librt.sl -lpthrea
d -l:libnss_dns.1 -l:libdld.sl -lm -lpthread -lpthread -I../inc
*** Error exit code 1

Stop.
35 REPLIES 35
Dennis Handly
Acclaimed Contributor

Re: Error compiling pro*c thru make in HP-UX

Do you know where those unsats are defined?

You do seem to have your object before all of your libs, so -Wl,+n probably wouldn't work.
hpuserhk
Frequent Advisor

Re: Error compiling pro*c thru make in HP-UX

Hello Dennis,

Thanks for ur prompt reply

please let me know how i can compile in this
circumstance, i am using make file
can you gime sample make file for this compilation ,my make file just have information abt main header file used by my programm and abt .pc/.c/.o file, it do not
have any info abt other lib etc
Dennis Handly
Acclaimed Contributor
Solution

Re: Error compiling pro*c thru make in HP-UX

>please let me know how I can compile in this circumstance,

Not really. I have no idea whether these symbols are yours or are part of Pro*C??
xu_freeall (tapin.o)(code)
xd_setp
xu_perror
asn1D_DataInterChange

If these are yours, you need to define them. If not, perhaps you forgot a lib at the end of your list?

If you want to search libs, you can do:
$ nm -pxNA path/lib* | fgrep -e xu_freeall -e xd_setp -e xu_perror

And in this case, look for the definitions with "T".

hpuserhk
Frequent Advisor

Re: Error compiling pro*c thru make in HP-UX

when i run:
nm -pxNA path/lib* | fgrep -e xu_freeall -e xd_setp
i get this error:
nm: path/lib*: cannot open


I want to give some more info:
i am including one header file in my
main.pc file which is calling
(unsatis)xu_freeall etc as extern
hpuserhk
Frequent Advisor

Re: Error compiling pro*c thru make in HP-UX

when i run following commnad with path(as my curr dir)
nm -pxNA path/lib* | fgrep -e xu_freeall

I get following out put:

libasn1ber.a:0x00003a14 T xu_freeall
Dennis Handly
Acclaimed Contributor

Re: Error compiling pro*c thru make in HP-UX

>i get this error: nm: path/lib*: cannot open

Oops, you were suppose to replace "path" by the path to the libs you want to search.

>I get following output:
libasn1ber.a:0x00003a14 T xu_freeall

Good, you need to add -lasn1ber to your makefile. I assume there is a -L path that matches where you found it?

You should check to make sure the other 3 are there too.
hpuserhk
Frequent Advisor

Re: Error compiling pro*c thru make in HP-UX

Thanx for ur help
all 3 unstats there
i tried adding this file ,-lasn1ber to my make file,but still errors
can you give me exact syntax how i can add it
Dennis Handly
Acclaimed Contributor

Re: Error compiling pro*c thru make in HP-UX

>I tried adding this file, -lasn1ber to my makefile

Everybody's makefiles are different.
Did you get the same errors?

There should be some make macro with "LIB" in it. You just add: -lasn1ber

This macro would have to be used in the rule that builds tapin.exe.

hpuserhk
Frequent Advisor

Re: Error compiling pro*c thru make in HP-UX

Yes i get same error
Actually i created new make file for running this programm,is there any way i link required file (libasn1ber.a) with programm for resolving error