简体   繁体   中英

How to configure swig to map size_t as ulong instead of uint (c#) in 64 bit platforms

The problem is that swig is mapping size_t variables as uint in c# this is correct in 32 bit, but I need to create the wrapper for the 64 bit version too. I need help with the configuration of the interface to use ulong instead of uint for size_t on 64 bit platforms. The interface is really simple I just added the header files directly. There is no need to linux support since the project is only for windows and the compiler is Visual Studio 2010.

Any help will be greatly apreciated.

%apply is sort of like a #define. I've been using it to convert int64_t to long long.

%apply ulong {size_t}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM