How to configure scons to link using rpath on mac?

元气小坏坏 提交于 2019-12-11 05:55:19

问题


It works on Ubuntu to link my task using RPATH, but on mac, it doesn't work

env.Program(source = Glob("*.cpp") + Glob("../*.cpp"),
            LIBS = [
                "l_util",
                "boost_system",
                "boost_timer",
            ],
            LIBPATH = libPath,
            RPATH = libPath,
            CPPPATH = includePath)

On Ubuntu, using ldd, I can see shared libs are linked with absolute path. But using otool -L on mac gives me relative path to top dir of my Sconstruct file. Anyone setup RPATH correctly on mac using scons?

来源:https://stackoverflow.com/questions/30271791/how-to-configure-scons-to-link-using-rpath-on-mac

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!