Equivalent of import libraries in Linux

后端 未结 2 1353
忘掉有多难
忘掉有多难 2021-02-06 16:44

In Windows C++ when you want to link against a DLL you must supply an import library. But in GNU build system when you want to link against .so files which are the equivalent of

2条回答
  •  梦如初夏
    2021-02-06 17:23

    To add to Basile's answer, you may occasionally need import libraries on Linux to simulate delay loading of shared libraries (which is useful e.g. if your app rarely needs this library and you don't want to waste resources on it).

    Such simulated import libraries would consist of a bunch of wrappers that call dlopen and dlsym internally and then goto to implementation in shared library. They can be implemented manually, via project-specific script or via generic tool Implib.so.

提交回复
热议问题