Using macports dylibs without macports
cssdev at mac.com
cssdev at mac.com
Wed Sep 30 03:39:43 PDT 2009
On Sep 28, 2009, at 5:23 PM, Paul Dennis Simonson wrote:
> All of the *.a files build just fine using MacPorts. I build and
> link my programs using XCode 3.2, and the build is successful when I
> build a command line utility and link to the *.a files. However,
> the program is looking for the *.dylib files when I try to run the
> program on another computer and of course fails to find them!
>
> On Sep 28, 2009, at 1:56 PM, Ryan Schmidt wrote:
>
>> On Sep 28, 2009, at 12:27, Paul Dennis Simonson wrote:
>>
>>> Is there any way to force MacPorts to make a static library that
>>> we can link to and distribute easily? It used to do this!!!
>>
>> Ports should install static and dynamic libraries wherever
>> possible. If you find ports that are missing one or the other,
>> please file tickets for those ports.
It might also depend on how the linking takes place. When both static
and dynamic libraries are available, the linker links with the dynamic
libraries by default. I know I've had to provide the full path to the
library archive, so you might need to link using "/opt/local/lib/
libfreeimage.a" instead of "-L/opt/local/lib -lfreeimage".
Trying to make every port force static libraries might not be
feasible, as it would required forcing static linking with all
dependencies.
Chris
More information about the macports-users
mailing list