linker - Can rpath value be a symbolic link? -


in makefile i'm passing rpath linker this

-wl,-rpath,/absolute_path_to_folder_with_lib 

everything works, when

-wl,-rpath,~/symlink 

where ~/symlink -> /absolute_path_to_folder_with_lib library not loaded can value of rpath symbolic link ?

can value of rpath symbolic link?

it sure can, misunderstood problem, not symbolic link, ~ expansion.

when link binary -wl,-rpath,~/symlink, end rpath literally ~/symlink. such directory (or symlink) not exist.

when type e.g. ls ~/symlink shell, happens shell expands ~ whatever $home set to, , readdir on expanded result.

but dynamic linker not perform such expansion, , literally looks ./~/symlink, of course doesn't exist.

what want is: -wl,-rpath,$home/symlink.


Popular posts from this blog