gpt4 book ai didi

c# - 如何配置 swig 以在 64 位平台中将 size_t 映射为 ulong 而不是 uint (c#)

转载 作者:太空宇宙 更新时间:2023-11-04 12:18:57 25 4
gpt4 key购买 nike

问题是 swig 将 size_t 变量映射为 c# 中的 uint 这在 32 位中是正确的,但我也需要为 64 位版本创建包装器。我需要接口(interface)配置方面的帮助,以便在 64 位平台上使用 ulong 而不是 uint 作为 size_t。界面真的很简单我直接加了头文件就可以了。不需要 linux 支持,因为该项目仅适用于 windows,编译器是 Visual Studio 2010。

我们将不胜感激任何帮助。

最佳答案

%apply 有点像#define。我一直在使用它来将 int64_t 转换为 long long。

%apply ulong {size_t}

关于c# - 如何配置 swig 以在 64 位平台中将 size_t 映射为 ulong 而不是 uint (c#),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6154442/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com