日期:2014-05-16  浏览次数:20750 次

Linux 动态库 dlopen
什么情况会出现dlopen打开一个自己生成的动态库会返回NULL,打开不成功?求解

------解决方案--------------------
库文件存在,并且确实是一个动态库?
------解决方案--------------------
不存在
格式不对
ABI不同
权限
被独占

种种可能
------解决方案--------------------
RETURN VALUE
If file cannot be found, cannot be opened for reading, is not of an appropriate object format for processing by dlopen(), or if an error occurs during
the process of loading file or relocating its symbolic references, dlopen() shall return NULL. More detailed diagnostic information shall be available
through dlerror().

ERRORS
No errors are defined.