'RTLD_NEXT' undeclared

前端 未结 4 715
半阙折子戏
半阙折子戏 2020-12-29 02:29

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

4条回答
  •  有刺的猬
    2020-12-29 03:33

    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.

提交回复
热议问题