Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以成功调用dlopen()“指向”另一个共享对象的共享对象?例如,我想动态打开库/usr/lib/libpanel.so。然而,它不是一个真正的图书馆。相反,它“指向” /usr/lib/libpanelw.so:
dlopen()
/usr/lib/libpanel.so
/usr/lib/libpanelw.so
$ cat /usr/lib/libpanel.so INPUT(-lpanelw)
随着dlopen()我得到一个file too short错误。有什么方法可以成功加载这些类型的库?
file too short
(额外问题:这类库的实际术语是什么?)
您可以通过符号链接来做到这一点。您的系统很有可能已经使用许多标准 .so 完全做到了这一点。
尝试ln -s /usr/lib/libpanelw.so /usr/lib/libpanel.so
ln -s /usr/lib/libpanelw.so /usr/lib/libpanel.so