如何链接指定glibc
我有一个 cmake 项目需要与 glibc-2.33 链接。由于系统 glibc 是低版本,并且不建议在系统中安装新的 glibc,因此我在 http://web.yl.is.su-tokyo.ac.jp/~tosh/kml/how_to_build_and_use_glibc.html 进入自定义路径。但我不知道如何添加 cmake 语句,以便我可以将项目与 glibc-2.33 链接(应该是链接器和所有库)。也许有人可以给我一些建议。谢谢
I have a cmake project that need to be linked with glibc-2.33. As system glibc is low version and install new glibc to system is not recommended, I build and install glibc-2.33 following with #2 in http://web.yl.is.s.u-tokyo.ac.jp/~tosh/kml/how_to_build_and_use_glibc.html into a custom path. but I'm not sure how to add cmake sentence so that I can link the project with glibc-2.33 (should be linker and all libraries). Maybe someone can give me some advice. Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您引用的示例不需要您链接到新的GLIBC,而是使用“显式加载程序调用” -
/path/to/ld.so /path/to/binary
运行时。如果您确实想链接到新的 GLIBC,请参阅此答案。抱歉,我不知道如何使用
cmake
执行此操作。The example you referenced doesn't require you to link against the new GLIBC, and instead uses "explicit loader invocation" --
/path/to/ld.so /path/to/binary
at runtime.If you do want to link against the new GLIBC, see this answer. Sorry I don't know how to do this with
cmake
.