'RTLD_NEXT'undeclared [英] 'RTLD_NEXT' undeclared

查看:1133
本文介绍了'RTLD_NEXT'undeclared的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图编译一个C程序,但我得到错误'RTLD_NEXT'未声明。我认为这应该在dlfcn.h中定义,c程序包括,但是当我看着dlfcn.h里面没有RTLD_NEXT。



如何修复这个问题在于 RTLD_NEXT 没有定义,因为它不是定义的。

posix标准。因此,除非您 #define _GNU_SOURCE -D_GNU_SOURCE



POSIX的其他相关部分是 dlfcn。 h dlsym.h 。有趣的是,后面提到 RTLD_NEXT 。显然,GNU人们对于什么是扩展而不是扩展有点困惑。


I'm trying to compile a C program but I get the error 'RTLD_NEXT' undeclared. I think this is supposed to be defined in dlfcn.h which the c program includes, but when I looked inside dlfcn.h there is no RTLD_NEXT.

How do I fix this?

解决方案

The issue here is that RTLD_NEXT is not defined by the posix standard . So the GNU people don't enable it unless you #define _GNU_SOURCE or -D_GNU_SOURCE.

Other relevant pieces of POSIX are dlfcn.h and dlsym.h. Interestingly, the later mentions RTLD_NEXT. Apparently, the GNU people are a bit confused about what is an extension and what is not.

这篇关于'RTLD_NEXT'undeclared的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆