I would like to use SWIG on Windows for building 64 bit applications. I have a class that has a pointer in it to a buffer, and because I would like to interface with a .NET class, the pointer is declared as intptr_t
.
The problem is that the standard SWIG stdint.i
assumes that intptr_t
is either int
(on 32 bit environment) or long
(on 64 bit environment). While this is true on Unix, it is false on Windows. Does anyone have either similar experience or any ideas how to create a workaround for this?
I already set up the typemaps needed for the intptr_t
=> IntPtr
conversion and it is working fine in 32 bit environment, but it truncates the pointer in 64 bit environment.