On 19 Aug 2008, at 12:55, Werner Bochtler wrote:

Can anyone give me a hint how to set the 'install_name',
'compatibility_version' and 'current_version' in FPC shared libraries
for Mac OS X?

In exactly the same way as for a C shared library: by passing the appropriate flags to the linker. From "man ld":

     -install_name name
Sets an internal "install path" (LC_ID_DYLIB) in a dynamic library. Any clients linked against the library will record that path as the way dyld should locate this library. If this option is not specified, then the -o path will be used. This option is also called -dylib_install_name for compati-
                 bility.

     -compatibility_version number
Specifies the compatibility version number of the library. When a library is loaded by dyld, the compatibility version is checked and if the program's version is greater that the library's version, it is an error. The format of number is X[.Y[.Z]] where X must be a positive non-zero number less than or equal to 65535, and .Y and .Z are optional and if present must be non-negative numbers less than or equal to 255. If the compatibility version number is not specified, it has a value of 0 and no checking is done when the library is used. This option is also called - dylib_compatibil-
                 ity_version for compatibility.

     -current_version number
Specifies the current version number of the library. The cur- rent version of the library can be obtained programmatically by the user of the library so it can determine exactly which version of the library it is using. The format of number is X[.Y[.Z]] where X must be a positive non-zero number less than or equal to 65535, and .Y and .Z are optional and if present must be non-negative numbers less than or equal to 255. If the version number is not specified, it has a value of 0. This option is also called - dylib_current_version for
                 compatibility.

->

fpc -k"-install_name somename" -k"-compatibility_version 1.2.3" -k"- current_version 11.12.13" mysharedlib.pp


Jonas
_______________________________________________
fpc-pascal maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to