我在文件中有一个函数原型(prototype)。在 C++ 中,有什么方法可以通过在运行时读取文件来创建函数指针吗?
最佳答案
您正在正确寻找libffi , 来自 Wikipedia :
libffi is a foreign function interface library. It provides a C programming language interface for calling natively compiled functions given information about the target function at run time instead of compile time. It also implements the opposite functionality: libffi can produce a pointer to a function that can accept and decode any combination of arguments defined at run time.
关于c++ - 有什么方法可以通过在 C++ 中读取文件来构造函数指针,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19673767/