C late binding with unknown arguments

后端 未结 1 1107
闹比i
闹比i 2020-12-04 04:11

I am presently in a case where I need to call a lot of function pointers that has been extracted at runtime. The problem is that the arguments are unknown at compilation t

相关标签:
1条回答
  • 2020-12-04 04:37

    This is a hard problem without, unfortunately, good or easy answers.

    See this former SO question: Run-time parameters in gcc (inverse va_args/varargs)

    See this C FAQ question: http://c-faq.com/varargs/invvarargs.html

    See this collection of "wacky ideas" by the C FAQ list maintainer: http://c-faq.com/varargs/wacky.html


    Addendum: see this former SO question: How to call functions by their pointers passing multiple arguments in C?

    ...which mentions "libffi": http://sourceware.org/libffi/

    0 讨论(0)
提交回复
热议问题