Hi, To clarify: 0MQ passes two CRT objects across the DLL boundary.
First, it passes errno reference. Thus, when using different runtime libraries, it's important to use zmq_errno() function instead of directly accessing errno. Second, it passes a SOCKETs when using zmq_poll() and zmq_getsockopt (ZMQ_FD). However, the article doesn't mention the sockets in the list of resources that can't be passed across DLL boundary. Moreover, there are people using 0MQ with different CRT than application CRT (I know because they've reported the problem that lead to introduction of zmq_error) but nobody ever reported a problem with passing sockets around. Martin On 16/12/11 22:51, Dimiter 'malkia' Stanev wrote: > I would assume so, if the note that I've posted from MSDN covers al details. > > There is one more thing: > > The C++ runtime itself can also be linked dynamically, or statically, > independent (to some degree) of the C run-time library. > MSVCPxx.DLL that is. > > I chose for my projects to use the Windows DDK (7.1) and make each > library dynamic one (I'm using them from luajit). I've also made sure > that I link to MSVCRT.DLL, and that it works back on Windows XP (it > could even on 2000). I even split OpenPGM, and create it as .DLL too, > and libzmq uses it from there. > > > On 12/16/2011 1:26 PM, Johnny Gozde wrote: >>> And libzmq simply shines in this respect. Small simple "C" interface, >>> and no reliance on managing resources other than it's own functions. >> >> Just to clarify, are you suggesting that libzmq is a good candidate >> for using the /MT option because it doesn't pass CRT objects around? >> >> This would match with my experience -- I've always used the /MT option >> in my libzmq builds to avoid having to install the Visual C++ >> Redistributable package on production machines. > _______________________________________________ > zeromq-dev mailing list > [email protected] > http://lists.zeromq.org/mailman/listinfo/zeromq-dev _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
