|
From: | Jacob Barthelmeh |
Subject: | Linking libtool created .la to shared library .dylib |
Date: | Tue, 6 Oct 2015 09:56:19 -0600 |
Hello, Am stumped on a link. Even after pouring over the manuals for hours and searching online it is probably a misunderstanding of autotools. I have one .la library made by libtool, one .dylib shared library and am creating a program. The .la is linked to the .dylib and the program uses the .la. Makefile.am for the .la library
Makefile.am for program with libtool wrapper
libA.la is created and links to B.dylib but the test program "wrapper" created by automake is exporting DYLD_LIBRARY_PATH to find libA.la while not linking to B.dylib. Giving the error
Some things that I have tried are adding "-Ldir/to/ -lB" to test_LDFLAGS in addition to already being added in test_LDADD. And have tried setting test_LDFLAGS = -rpath -Ldir/to in the hopes that setting the runtime search path to the directory where B.dylib is would help. If I manually export DYLD_LIBRARY_PATH to include /dir/to/B.dylib then the test program is able to run but I'm looking to have autotools take care of this rather than requiring someone to export a path before being able to run it. Any tips or ideas would be greatly appreciated. Regards, Jacob |
signature.asc
Description: Message signed with OpenPGP using GPGMail
[Prev in Thread] | Current Thread | [Next in Thread] |