Hi, I just tried creating an x86 MSVC import lib for a libzmq.dll generated by MINGW32 on 32-bit Windows. I did get it to work. I imagine cross-compiled, 64-bit versions and libczmq.dll would work too.
There's no C++ name mangling issue since libzmq exports a C interface. The errors you encountered when compiling czmq with MSVC is probably due to the C99 style used in czmq. Follow instructions on the web to create a .def file: nm libzmq.dll | findstr /C:" T _z" > libzmq.def then edit the .def file so that it looks like this: EXPORTS zmq_bind zmq_close ... How does your .def file look like? Generate the .lib file: lib.exe /machine:x86 /def:libzmq.def Tested it out with a simple zeromq program compiled with MSVC. On Mon, Oct 7, 2013 at 1:43 PM, HG Choi <c.hog...@gmail.com> wrote: > To Developers, > > Even though I do not enjoy dealing with Windows, I must do so at this > point in time. I have successfully cross-compiled libzmq, libczmq, and > libfmq for x86_64 Windows using Mingw under Linux. All three were tested > using the built selftests.exe. So now I know it is possible to use all > three libraries in Windows. > > But the issue is that the current QT project that I am tying to integrate > FileMQ (zmq, czmq) into is a MSVC project. Thus my cross compiled mingw c++ > libs are not compatible with the msvc compiler. I have been told this is > due to C++ name mangling issues. > > http://www.mingw.org/wiki/MixingCompilers > > I have tried to create mvsc compatible libs through DLLs using the visual > studio dumpbin, dlltool, and def file method, but also no luck. Maybe > someone has succeeded? > > Cross compiliation with x86_64-w64-mingw32 toolset to Windows definitely > works, but as far as I know, for MSVC, I am not sure. I have tried using > the i586-mingw32msvc but without success.. > > For my situation, the ideal method of building these libraries is to use > the msvc solution files on a Windows host, but I could only get libzmq to > build cleanly without errors. > > Below is the errors I receive from a fresh czmq-master on Visual Studio > 2010. > http://pastebin.com/7piDizJA > > If anyone has any clues to what is causing the errors or successfully > built CZMQ and FMQ using Visual Studio for Windows x86_64, I would really > appreciate the guidance. > > Thank you for reading, > > Ho-Gyun Choi > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev@lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > >
_______________________________________________ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev