Using macports dylibs without macports

Paul Dennis Simonson psimonso at illinois.edu
Tue Sep 29 09:32:18 PDT 2009


Here is the output of otool -L:

dyn-130-126-15-84:Release paulsimonson$ otool -L ShrimpAnalysis_SL
ShrimpAnalysis_SL:
	/opt/local/lib/libgsl.0.dylib (compatibility version 15.0.0, current  
version 15.0.0)
	/opt/local/lib/libgslcblas.0.dylib (compatibility version 1.0.0,  
current version 1.0.0)
	/opt/local/lib/libMagickCore.2.dylib (compatibility version 3.0.0,  
current version 3.0.0)
	/opt/local/lib/libMagick++.2.dylib (compatibility version 3.0.0,  
current version 3.0.0)
	/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current  
version 7.9.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current  
version 123.0.0)

So, it is definitely linking to the .dylib libraries.  Why is it doing  
this, and how can I get it to link against the .a libraries instead?


On Sep 29, 2009, at 2:26 AM, Jochen Küpper wrote:

> On 29.09.2009, at 00:23, 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.
>
> Apparently you do not link in the .a archives, but against  
> the .dylib dynamic libraries.
> What does
>   otool -L <utility>
> say?
>
>> 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.
>
> /Jochen



More information about the macports-users mailing list