Operating System - HP-UX
1833832 Members
2278 Online
110063 Solutions
New Discussion

unable to link shared library

 
sushant keerti
Advisor

unable to link shared library

Hi all,


We are using nmake utility to build our application. we are able to link the .a library, but unable to link .sl libraries.
Is there any compilation flag do we need to use?.

Actually we are migrating from hp-ux 11.0 to 11.23. We are able to link .sl library in 11.0, but the same is not working in 11.23.



3 REPLIES 3
Dennis Handly
Acclaimed Contributor

Re: unable to link shared library

What errors are you getting?
You need to use the -b option to create shlibs in either ld, cc or aCC.
And of course you need to compile with +z/+Z on PA to create PIC code.
sushant keerti
Advisor

Re: unable to link shared library

Dennis,
We have code which uses dmq messageQ functions. We have installed dmq messageQ and there are dmq libraries which we need to link. One of them is libdmq.sl,this lbrary we are unable to link. But at the same time we are able to link the library named libfml32.a of dmq. These both are in the same directory.

below is the output when i compile the .nmk file with the command
nmake -v -f

.ARPROFILE. [ functional ] =
P [ free ] =
T [ free ] = libfml32-g.a
T [ free ] = libfml32_g.a
T [ free ] = libg/libfml32.a
T [ free ] =
P [ free ] = $(%:/-l//)
Q [ free ] = $(.SHAREDLIBNAME.:N=$(P)*:C|$(P)||)
T [ free ] =
T [ free ] =
T [ free ] =
T [ free ] =
V [ free ] =
D [ free ] =
L [ free ] = -lfml32
H [ free ] = -
S [ free ] = |$(CC.SUFFIX.SHARED)$(V)*
D [ free ] =
G [ free ] = libfml32.a
T [ free ] = libfml32.a
.BIND.-l% [ free functional ] = libfml32.a
.REQUIRE.-l% [ functional ] =
T [ free ] =
T [ free ] =
T [ free ] = lib/fml32
T [ free ] =
.REQUIRE.-l% [ functional ] =
.BIND.-l% [ free functional ] =
.ARPROFILE. [ functional ] =
P [ free ] =
T [ free ] = libdmq-g.a
T [ free ] = libdmq_g.a
T [ free ] = libg/libdmq.a
T [ free ] =
P [ free ] = $(%:/-l//)
Q [ free ] = $(.SHAREDLIBNAME.:N=$(P)*:C|$(P)||)
T [ free ] =
T [ free ] =
T [ free ] =
T [ free ] =
V [ free ] =
D [ free ] =
L [ free ] = -ldmq
H [ free ] = -
S [ free ] = |$(CC.SUFFIX.SHARED)$(V)*
D [ free ] =
G [ free ] =
T [ free ] =
T [ free ] =
T [ free ] =
T [ free ] = lib/dmq
T [ free ] =
.ERROR [ free ] = 3 don't know how to make finish : ../../../../../develop/bin/MISQRY : -ldmq


You can see that libfml32.a got linked , but for libdmq.sl , it is throwing error.

Is there any specific compilation option do we need to add for linking .sl libraries?

Dennis Handly
Acclaimed Contributor

Re: unable to link shared library

>You can see that libfml32.a got linked, but for libdmq.sl, it is throwing error.

No, I see nothing, just some nmake debugging stuff. (Take the -v off.) I need to see the actual compile and link lines.

Do you have evil "@" at the start of your make rules?

If this is a dependency rule, where is the make rules?
../../../../../develop/bin/MISQRY : -ldmq
You need an actual filename instead of -ldmq.