[openbeosnetteam] Re: ELF linkage and libraries

> I just want to take this opportunity to point out that there
> are a lot of programs that will try to link with -lsocket.
> If it is possible to have an onmipresent link somehow between
> libsocket.so and libnet.so it would simplify ports.

What exactky do you mean? libnet constains the C++ API and libsocket is 
the standard sockets API. Also, AFAIK, you don't need to link against 
both of them. If you're using the C++ API all you need is libnet. And 
yes, one library can depend on another one:

[/system/lib]> getlibs libnet.so
libroot.so
libbind.so 

In the example above libnet.so requires libroot.so and libbind.so.

> I still don't understand a lot about how libraries are
> linked but is there perhaps a way to say that a
> shared library depends on another? (within the lib)  In
> this case you could make one of the libs simply depend
> on the other and then have a nice breakdown of the
> functionality between the API and libraries, without
> forcing the app developer to list all those libs.

You can do that. :) See above. :)
 
> This extends to other libs too, like libc and libm.  It
> would be rather clean if libbe would simply depend on 
> a libc and libm rather than being a big ball of wax.

This is what happens.
 
> At the very least it would be helpful to have symlinks
> from libc.so to libbe.so, (or libsocket.so to libnet.so)
> if those links would work properly.  (I don't know 
> about that question regarding the soname inside the libs.)

Wait. I guess I am loosing you. What exactly do you want to do? libbe *
IS NOT* libc and libnet *IS NOT* libsocket.

-Bruno


--
Fortune Cookie Says:

Do infants have as much fun in infancy as adults do in adultery?


Other related posts: