'RTLD_NEXT'undeclared [英] 'RTLD_NEXT' undeclared
问题描述
我试图编译一个C程序,但我得到错误'RTLD_NEXT'未声明。我认为这应该在dlfcn.h中定义,c程序包括,但是当我看着dlfcn.h里面没有RTLD_NEXT。
如何修复这个问题在于 RTLD_NEXT
没有定义,因为它不是定义的。
#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屋!