environment variables - Problems with using setenv and then making the dlopen call -
environment variables - Problems with using setenv and then making the dlopen call -
i using setenv set dyld_library_path when dlopen() have right paths find .dylib, when dlopen() doesn't seem search paths added dyld_library_path.
from can gather changes dyld_library_path won't take effect until re-execute process happens. correct?
also if correct, there way set dyld_library_path , having changes work out doing reset of process.
oh yeah writing code on mac osx.
thanks in advance.
i don't know mac os, on linux, loader reads value of getenv("ld_library_path")
once, , saves away, long before first instruction of executable runs. subsequent modification of ld_library_path
programme affects children execve()
s, not process itself. imagine it's similar on mac os.
the usual way around either re-execve
proces (java this), or utilize shell wrapper sets environment , exec's real binary (firefox that).
there might mac os specific way update library search path, though google doesn't seem find matches. pretty sure there isn't such mechanism on linux.
environment-variables dlopen dyld setenv
Comments
Post a Comment