Using Dynamic Libraries(Updating)

Linkage:

https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/UsingDynamicLibraries.html#//apple_ref/doc/uid/TP40002182-SW10


When you need to use a dynamic library in your product, you have to install the library in your computer. You may use dynamic libraries as dependent libraries (by specifying them in your product’s link line) or as runtime loaded libraries (by loading them when they are needed, using dlopen(3) OS X Developer Tools Manual Page).


Installing Dependent Libraries

Before you can use a dynamic library as a dependent library, the library and its header files must be installed on your computer. The standard locations for header files are ~/include,/usr/local/include and /usr/include. The standard locations for dynamic libraries are ~/lib,/usr/local/lib, and /usr/lib.

You may also place the .dylib file at a nonstandard location in your file system, but you must add that location to one of these environment variables:

  • LD_LIBRARY_PATH

  • DYLD_LIBRARY_PATH

  • DYLD_FALLBACK_LIBRARY_PATH

For Example: We require that the Averages 1.1 and Ratings 1.1 dynamic libraries be installed on your computer. To install these libraries:

  1. Open this document’s companion-file package.

  2. In Terminal, execute these commands:

    [Averages/1.1]% make install
    [Ratings/1.1]% make install

    Note: To uninstall the libraries, execute these commands:

    [Averages/1.1]% make uninstall
    [Ratings/1.1]% make uninstall


Using Dependent Libraries



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值