c++ - 有什么方法可以通过在 C++ 中读取文件来构造函数指针

标签 c++ c file function-pointers

我在文件中有一个函数原型(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/

相关文章:

c - 为什么_XBEGIN_STARTED 等于-1?

linux - 在 Linux 上设置文件数量限制的最正确方法是什么?

c++ - 使用 pow 会产生意想不到的结果

c - 二维数组指针

C++:使用 dll 导出包装非托管 dll

TC77传感器的C编程错误

php - Laravel 5.3 多文件上传

c# - 使用正确的编码导出文件

C++ - 运行 Moses 解码器时区域设置名称无效异常

c++ - 制作生成器列表(lambda 的 vector )会导致通过引用捕获的非常奇怪的行为