Re: [gtk-list] Re: HP-UX modules follow up



"D. Emilio Grimaldo Tunon" wrote:
> "D. Emilio Grimaldo Tunon" wrote:
> 
> > --> Linking Plugin A: lib/libpluga.sl.0.0.0
> >         cc -Wl,-b -Wl,+h,libpluga.sl.0 -o lib/libpluga.sl.0.0.0
> > obj/libpluga.o -ldld
> > /usr/ccs/bin/ld: DP relative code in file /opt/langtools/lib/crt0.o -
> > shared library must be position
> >     independent.  Use +z or +Z to recompile.
> 
>   Strange thing, using cc and passing -Wl arguments causes it to
> break, whereas using ld directly makes it link without problems.
> But on Linux I get the opposite effect, using ld directly causes
> problems and using cc to link makes it good,

Running 'cc' with '-v' gives something like:

	/usr/ccs/bin/ld /opt/langtools/lib/crt0.o -u main -b +h libpluga.sl.0 \
		-o lib/libpluga.sl.0.0.0 obj/libpluga.o -ldld -lc

Since you're trying to build a shared library, you don't want crt0.o
linked in.  I didn't see any way to tell 'cc' not to link in crt0.o
and libtool seems to use 'ld' directly.

> any ideas?

Use libtool?



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]