Operating System - Linux
1748279 Members
4194 Online
108761 Solutions
New Discussion юеВ

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

 
SOLVED
Go to solution
Dennis Handly
Acclaimed Contributor

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

>is there any way I link required file (libasn1ber.a) with program for resolving error

As I said, you need to add this lib to an existing *LIB* make macro, or add this lib to the build rule that links tapin.exe.

I suppose I can look at your makefile if is isn't too complex.

hpuserhk
Frequent Advisor

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

unsat function prototype in find in the called header file
My makefile is very simple as below please see:
.SUFFIXES: .pc .c .o

DEBUG_FLAG =

HDRS=tap.h asn1type.h
HDRS1=libasn1ber.a
EXE=tapin.exe
#include $(ORACLE_HOME)/precomp/lib/env_precomp.mk


all:tapin.pc
xpc tapin.pc -o ./$(EXE)

tapin.o:tapin.c $(HDRS) $(HDRS1) makefile
xcc tapin.c -c $(DEBUG_FLAG) $(HDRS1)

tapin.c:tapin.pc $(HDRS) $(HDRS1) makefile
xpc tapin.pc -c $(DEBUG_FLAG) $(HDRS1)



clean:
rm -f tapin.o tapin.c tapin.lis
Dennis Handly
Acclaimed Contributor

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

>My makefile is very simple as below please see:

Ok, trying to guess what it does:
all: tapin.pc
xpc tapin.pc -o ./$(EXE) -lasn1ber

You may want to look at env_precomp.mk to see if there is a variable you can set to add your lib.
hpuserhk
Frequent Advisor

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

As you can see in my make file
#include $(ORACLE_HOME)/precomp/lib/env_precomp.mk
is commented , and even if try to modify its read only

is there any other way i can link required library file libasn1ber.a

Thanks
Dennis Handly
Acclaimed Contributor

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

>As you can see in my makefile is commented

Oops, right.

>and even if try to modify its read only

That doesn't prevent you from define macros that are used in that makefile.

>is there any other way i can link required library file libasn1ber.a

As I said:
xpc tapin.pc -o ./$(EXE) -lasn1ber
hpuserhk
Frequent Advisor

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

Hello ,
after i modified: xpc tapin.pc -o ./$(EXE) -lasn1ber
I am getting this error




: C compiler
/usr/ccs/bin/ld: Can't find library: "asn1ber"
xcc@ : Compilation Error! ./tapin.c -o ./tapin.exe -lasn1ber -I/opt/oracle/produ
ct/ora92/precomp/public -I/opt/oracle/product/ora92/rdbms/public -I/opt/oracle/
Dennis Handly
Acclaimed Contributor

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

>ld: Can't find library: "asn1ber"

You'll need to add -L path-to-your-lib, before that -lasn1ber.
(That you found with that nm command.)
hpuserhk
Frequent Advisor

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

please give me exact syntax how to add path to lib ,and where to add
if had tried but not working
Dennis Handly
Acclaimed Contributor

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

>please give me exact syntax how to add path to lib and where to add

xpc tapin.pc -o ./$(EXE) -L absolute-path-to-libasn1ber -lasn1ber
hpuserhk
Frequent Advisor

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

Thanks for ur replies

Actually i tried by defining macros in the make file,it seems to work,but i think out of 3 unsatis ,it found 2,but still not finding 3rd(asn1D_DataInterChange)
i tried to find it by command
nm -pxNA /path/lib* | fgrep -e asn1D_DataInterChange
it dont gives any output.
how to search for this in all the directories or what is alternative in this situation please advice