Operating System - HP-UX
1834629 Members
3148 Online
110069 Solutions
New Discussion

Re: Error wile compiling.

 
Anand_30
Regular Advisor

Error wile compiling.

I am trying to compile some Objective C programs in HPUX-10.20. The compiler is gcc. I am getting the following error while compilation:

/usr/local/bin/ld: Can't find library for -llibdb-3.2.sl

I don't have any idea about this error. Can anyone please help me out on this.

Thanks in advance.

Anand
7 REPLIES 7
Jean-Luc Oudart
Honored Contributor

Re: Error wile compiling.

I think if not a standard lib you will have to specify the path to library
e.g.

-L -llibdb-3.2.sl


in your makefile

Rgds,
JL
fiat lux
Jean-Luc Oudart
Honored Contributor

Re: Error wile compiling.

further more, I think this should be
-L -ldb-3.2
as prefix lib and suffix sl are implicit.

Rgds,
JL
Please let us know how you're getting on.
fiat lux
Umapathy S
Honored Contributor

Re: Error wile compiling.

Anand,
You link libraries normally taking out the lib prefix. In your case check

1. The library is available.
2. The path is there after -L
3. Change -llibdb-3.2sl to -ldb-3.2sl.

HTH,
Umapathy
Arise Awake and Stop NOT till the goal is Reached!
Anand_30
Regular Advisor

Re: Error wile compiling.

I have changed the makefile but still I am getting the error:

/usr/local/bin/ld: Can't find library for -libdb-3.2.sl

Is there any way that I can see where the libraries are being searched during the make.

Anand

Umapathy S
Honored Contributor

Re: Error wile compiling.

Anand,
Double check for the library. Add that path after -L.
-Umapathy
Arise Awake and Stop NOT till the goal is Reached!
Anand_30
Regular Advisor

Re: Error wile compiling.

I am not getting the previous error any more but I am getting the following error now:

/usr/local/bin/ld: Invalid fixup: 0x3e in file /opt/Apple/Library/Frameworks/EOs

Can anyone tell me how to fix this problem.

Anand.
ranganath ramachandra
Esteemed Contributor

Re: Error wile compiling.

note that this is while linking error, not while compiling.

if you are building a shared library, make sure you compile with the correct compiler option - its either +z or +Z for cc/aCC, either -fpic or -fPIC for gcc. in your case -fpic should work.
 
--
ranga
hp-ux 11i v3[i work for hpe]

Accept or Kudo