共享库更新(Shared library update)

编程入门 行业动态 更新时间:2024-10-10 02:18:41
共享库更新(Shared library update)

我的应用程序分为4个主要部分:

主要应用程序 (充当其他部分的粘合剂 - 加载插件,链接核心ui库) 核心 (与类等共享库,它甚至会像sdk一样,基本上包含除Ui之外的所有东西) ui (共享库,包含ui资源,类型等) 其他插件 (共享库,由主应用程序加载,将使用来自核心的插件管理器

这样做的主要原因是我希望只需为我的应用程序下载插件(通过该应用程序中的插件管理器窗口)就可以替换应用程序的所有部分。

假设我想重新设计我的应用程序的外观。 在这种情况下,我应该发布新版本的ui共享库/插件。

我不确定它是否会起作用,如果ui共享库在编译应用程序时通过链接器链接到我的应用程序( 核心ui由链接器链接,其他共享库/插件在应用程序启动时由插件管理器加载)。

问题 :最终可执行文件中可能会保存一些关于这些库的元数据,例如大小? 所以我可能不能只是替换ui共享库,而不需要再次编译和链接我的应用程序?

I have my application splited into 4 main parts:

main application (acting like a glue for other parts - load plugins, has linked core and ui libraries) core (shared library with classes etc., it will be even something like sdk, basically contains all except things related to Ui) ui (shared library, that contains ui resources, types etc.) other plugins (shared libraries, loaded by main application, which will use Plugin manager from core

The main reason for this is that i want to have possibility to replace all parts of application just by downloading plugins for my application (through plugin manager window in that application).

Let's say i want to redesign look of my app. In that case i should just release new version of ui shared library/plugin.

I am not sure if it will work, if that ui shared library is linked to my app by linker when application is compiled (core and ui are linked by linker, other shared libraries/plugins are loaded by plugin manager when app is starting).

Question:There will be probably saved some metadata about those libraries in final executable, for instance size?? So i probably can't just replace ui shared library, without need to compile and link my app again?

最满意答案

一般来说,如果原始库和替换库具有相同的ABI ,您可以在分发中将共享库替换为共享库的其他版本(无需重新编译可执行文件等)

Generally speaking, you can replace a shared library with an other version of the shared library in distribution (without recompilation of the executable, etc.) in case the original library and the replaced library do have same ABI

更多推荐

本文发布于:2023-07-31 08:12:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1342038.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Shared   library   update

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!