Using macports dylibs without macports

Jochen Küpper kuepper.jochen at googlemail.com
Wed Sep 30 04:11:56 PDT 2009


On 30.09.2009, at 12:39, cssdev at mac.com wrote:

> 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".

There's also the "-static" option...

/Jochen


More information about the macports-users mailing list