Shared library, library dependancy?

If you have a shared library libABC.so" rel="nofollow">libABC.so which links to libXYZ.so" rel="nofollow">libXYZ.so then while creating your libABC.so" rel="nofollow">libABC.so you have to link with libXYZ.so" rel="nofollow">libXYZ.so.

Up vote 2 down vote favorite 1 share g+ share fb share tw.

As an example of what I mean: Shared Library Build g++ ... `pkg-config gtk+-2.0 --cflags` ... `pkg-config gtk+-2.0 --libs` Desired User Build g++ file.cc -lfoo Where libfoo.so.0 is the shared library. I can only seem to get this to work if the user build includes the pkg-config gtk+-2.0 .... Is there a way, during the creation of the shared object, to allow the end user to not have to worry about the indirect libraries used within libfoo? C++ linux linker compilation shared-libraries link|improve this question asked Jul 8 '11 at 16:03ezpz3,012517 92% accept rate.

If so, it will be required during the user link as well. Otherwise, if it truly is using the shared lib, it shouldn't be required at build time but WILL be required at runtime. – Mike Ellery Jul 8 '11 at 18:04.

If you have a shared library libABC.so" rel="nofollow">libABC.so" rel="nofollow">libABC.so" rel="nofollow">libABC.so which links to libXYZ.so" rel="nofollow">libXYZ.so then, while creating your libABC.so" rel="nofollow">libABC.so" rel="nofollow">libABC.so" rel="nofollow">libABC.so, you have to link with libXYZ.so" rel="nofollow">libXYZ.so ld --shared -o libABC.so" rel="nofollow">libABC.so" rel="nofollow">libABC.so" rel="nofollow">libABC.so -L. -lXYZ While compiling the application, gcc app. C -L.

-lABC don't forget to, export the library path export LD_LIBRARY_PATH=.

1 you can set the DT_RPATH as well with -Wl,-rpath,. Instead of relying on the LD_LIBRARY_PATH environmental variable. – Sam Miller Jul 8 '11 at 20:28.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions