zeromq / cppzmq

Header-only C++ binding for libzmq
http://www.zeromq.org
MIT License
1.94k stars 757 forks source link

Linking errors when used with libzmq on Windows10, vs2019, vs2022 #535

Closed fuag15 closed 2 years ago

fuag15 commented 2 years ago

I'm building libzmq from CMake on Windows10 targeting x64 release. I've attempted with static and dynamic libs, I'm building without libsodium. I've attempted using vs2019 and vs2022. The library builds fine but at link time i get a bunch of errors around a couple of functions. Namely.

imp_zmq_poller_new __imp_zmq_poller_destroy imp_zmq_poller_wait_all __imp_zmq_poller_add

My suspicion is that this has something to do with #defined logic around the poller implementation stuff in libzmq. I tried regressing to the last stable tag and had the same issue. I'm going to continue investigation but as the logic around the poller #defines seems pretty involved I'm hopeful posting this will yield some more direction around where to look next. I'm hoping that someone else who uses this combo (libzmq, cppzmq) on windows can give some insight into these link issues.

I am just taking the two header files and including them directly in the project as the cmake stuff doesn't seem to work or do anything meaningful for my project, I just have those two header files in there as external dependencies. Perhaps this is the root cause of these issues?

fuag15 commented 2 years ago

well, i updated libzmq and forgot to enable drafts :X