• mac之dylib类型


    mac之 dylib类型

     1、dependent library

      A dependent library, from the client’s point of view, is a dynamic library the client is linked with. Dependent libraries are loaded into the same process the client is being loaded into as part of its load process. For example, when an app is launched, its dependent libraries are loaded as part of the launch process, before the main function is executed. When a dynamic library is loaded into a running process, its dependent libraries are loaded into the process before control is passed to the routine that opened the library.

     2、 runtime loaded library

      A runtime loaded library is a dynamic library the client opens with the dlopen function. Clients do not include runtime loaded libraries in their link line. The dynamic loader, therefore, doesn’t open these libraries when the client is loaded. Clients open a runtime loaded library when they’re about to use a symbol it exports. Clients don’t have any undefined external references to symbols in runtime loaded libraries. Clients get the address of all the symbols they need from runtime loaded libraries by calling the dlsym function with the symbol name.

      中文总结:

      1、dependent library是在程序启动时要完全加载的,这类dylib在编译时通过头文件引用了相应dylib中的符号,所以必须在程序启动时加载相应的dylib。

      2、runtime-loaded library是通过DLC函数来加载的dylib,源程序中绝不包含这类dylib中的符号的引用,要引用这类dylib中的符号,必须通过dlsym函数来寻找。

  • 相关阅读:
    Android 6.0权限
    从最简单的HelloWorld理解MVP模式
    DataSet、DataTable和DataGridView知识备忘
    Windows 窗体启动和关闭的事件顺序
    VB二进制文件读写
    C#操作符的重载
    虚方法(virtual)和抽象方法(abstract)的区别
    我的前端页面开发js简易有效环境
    css properties
    css属性值语法解读
  • 原文地址:https://www.cnblogs.com/tekkaman/p/3065325.html
Copyright © 2020-2023  润新知