可能导致dlopen的原因:找不到合适的图像(无法映射)? [英] What can cause dlopen: no suitable image found (can't map)?
问题描述
使用dlopen加载其他捆绑包时,可能导致以下错误的原因:
What can cause the following error when loading an additional bundle using dlopen:
dlopen($(OBJ_DIR)/Test-20091217211256.ob, 6): no suitable image found. Did find:
$(OBJ_DIR)/Test-20091217211256.ob: can't map
在发生此错误之前,进程将分配大量内存.
Before this error, the process allocates large amounts of memory.
(在错误中将$(OBJ_DIR)
替换为实际路径,以使其更易读).
(Substituted $(OBJ_DIR)
in the error for the actual path to make it more legible).
推荐答案
一种可能性是您要打开的共享库实际上不是共享库.在您的库上运行 file(1)
程序确保它实际上是一个共享库.在64位系统上报告Mach-O 64-bit dynamically linked shared library x86_64
或在32位系统上报告Mach-O dynamically linked shared library i386
.
One possibility is that the shared library you're trying to open isn't actually a shared library. Run the file(1)
program on your library to make sure it's actually a shared library. It should report something like Mach-O 64-bit dynamically linked shared library x86_64
on a 64-bit system or Mach-O dynamically linked shared library i386
on a 32-bit system.
这篇关于可能导致dlopen的原因:找不到合适的图像(无法映射)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!