[zeromq-dev] 0MQ and Windows X65 --- compiled and running using VS2010

Martin Sustrik sustrik at 250bpm.com
Thu Apr 15 08:14:34 CEST 2010


Hi Jarred,

> Did the same code change the other day, and can also confirm that it works.
> 
> If I recall, all the compiler warnings were because of the 8-byte size_t 
> on x64. I didn't dive any deeper than just reading the warnings.
> 
> Here is the fix to get the CLR bindings to run against either x86 and 
> x64. I don't have a github account yet...
> 
> zmq.cs
> 182,184c182,183
> <         //  TODO: Size of zmq_msg_t may differ depending on platform.
> <         //  For example, on Win64 it'll definitely be longer.
> <         private const int ZMQ_MSG_T_SIZE = 36;
> ---
>  >         // Determine if we're 64 or 32 bit and set msg size accordingly
>  >         private readonly int ZMQ_MSG_T_SIZE = IntPtr.Size == 4 ? 36 : 40;
> 
> Have tested that the binding works as expected in a Windows environment 
> with a x64 ZMQ build.

I've checked it. The problem is with pointer contained in zmq_msg_t, 
which has different length on 32 and 64 bit platforms. It's hopefully 
fixed now.

Martin



More information about the zeromq-dev mailing list