我试图绑定到一个返回结构(按值)的C函数。我知道我可以使用FFI手动包装它,但我不知道如何引导c2hs生成正确的代码。它似乎认为我的函数返回一个指针。module Point where
struct point { int y;#endc
sizeOf _ = {#sizeof point#}
alignme
我在我的一个项目中使用了alloca函数,并决定使用CMake来确保它可用。因此,我在CMakeLists.txt文件中添加了以下内容:check_symbol_exists(alloca stdlib.h;cstdlibALLOCA_EXISTS) message(FATAL_ERROR "Platform does not support alloca")