开发者

dlopen errors with relative path

开发者 https://www.devze.com 2023-02-22 19:59 出处:网络
I am trying to call a .dylib file from another .dylib f开发者_如何学运维ile. They are in the same folder. I do this:

I am trying to call a .dylib file from another .dylib f开发者_如何学运维ile. They are in the same folder. I do this:

void* handle = dlopen("./other.dylib", RTLD_LAZY);

But handle winds up NULL and dlerror() says it can't find it. However, if I use a absolute path, it works. The docs say I can use a relative path. I am sure my spelling and case are correct.

Why does it error?


A relative path is relative to your current working directory - not to the location of your first dylib

0

精彩评论

暂无评论...
验证码 换一张
取 消