[fpc-pascal] Packaging shared libraries for OSX, recommendations?

Bruce Tulloch pascal at causal.com
Mon Jun 10 12:49:20 CEST 2013


Okay, got it, thanks Jonas. -b


On Mon, Jun 10, 2013 at 7:55 PM, Jonas Maebe <jonas.maebe at elis.ugent.be>wrote:

>
> On 10 Jun 2013, at 11:41, Bruce Tulloch wrote:
>
>  On Mon, Jun 10, 2013 at 6:59 PM, Jonas Maebe <jonas.maebe at elis.ugent.be>*
>> *wrote:
>>
>>  Under Mac OS X (and *BSD, and probably even most Linux distributions
>>> these
>>> days), you would put it under /usr/local/[lib,include,share]**.
>>>
>>
>> Understood. So if we install our library, headers etc to
>> /usr/local/[lib,include,share] is it true that like any UN*X, in OSX:
>>
>>   - Command line programs *and* GUI apps will be able to use our library,
>>
>
> There is no difference between the two as far as the dynamic linker is
> concerned.
>
>    - XCode will be able to find and access the headers and,
>>
>
> Yes.
>
>    - XCode App programmers can copy the .dylib file (from
>>
>>   /usr/local/lib/libMyLib.dylib) to their project to include the library
>> and
>>   avoid the need to redistribute our package?
>>
>
> The last part is incorrect. See e.g. http://qin.laya.com/tech_**
> coding_help/dylib_linking.html<http://qin.laya.com/tech_coding_help/dylib_linking.html>and
> https://blogs.oracle.com/**dipol/entry/dynamic_libraries_**rpath_and_mac<https://blogs.oracle.com/dipol/entry/dynamic_libraries_rpath_and_mac>for more information. You need at least two versions of your library, or
> tell developers that want to include the library in their program to adapt
> the library's path with install_name_tool and compile/link against this
> modified version because otherwise their application will still insist on
> only looking for the /usr/local/lib version (which is why distributing a
> /usr/local/lib version is such a bad idea, because developers won't notice
> on their own machine if they make a mistake since that version can be used
> without them realising it)
>
>
>  Presuming the answers are all yes, is packagemaker the tool we should be
>> using to package the library for distribution?
>>
>
> Yes.
>
>
>
> Jonas
> ______________________________**_________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.**org<fpc-pascal at lists.freepascal.org>
> http://lists.freepascal.org/**mailman/listinfo/fpc-pascal<http://lists.freepascal.org/mailman/listinfo/fpc-pascal>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130610/b8a1ca09/attachment.html>


More information about the fpc-pascal mailing list