[zeromq-dev] Trouble compiling czmq under Visual Studio

Tom Quarendon tom.quarendon at teamwpc.co.uk
Fri Sep 12 17:12:47 CEST 2014

Since Visual Studio doesn't support C99, the C source files are compiled as C++. This appears to have thrown up a type issue.
In zsock_option.c, line 78 for example:

printf ("ZMQ_ROUTER_HANDOVER is not valid on %s sockets\n", zsock_type_str (self));

The compiler is complaining at passing a void* to zsock_type_str. I don't understand enough about this code to know what to do here. Zsock_type_str is expecting a zsock_t, but these functions such as zsock_set_router_handover take a "polymorphic" socket pointer, so the void* might not be a zsock_t, and might be a plain libzmq socket void*.  There doesn't seems to be an equivalent function provided by libzmq that can be called instead having called zsock_resolve. Also, since the code is generated by GSL I don't know how I'd go about fixing this anyway, not got as far as GSL code generation yet.

Am I doing something wrong, or is this an error in the code?

This is on czmq master.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20140912/4706c30b/attachment.htm>

More information about the zeromq-dev mailing list