morganstanley/modern-cpp-kafka

Windows Support

KevDi opened this issue · 5 comments

KevDi commented

Could this wrapper be used on Windows?
Because in the CMakeLists it links the Library against the pthread lib which is not available in Windows

Yes, it supports windows, and there's even CI for windows build, -- https://github.com/morganstanley/modern-cpp-kafka/blob/main/.github/workflows/kafka_api_ci_tests.yml#L270
As you could see, it might be named as pthreadVC3 (instead of libpthread) in windows dev env, thus need some trick to make the CMakelist work.

KevDi commented

does it requires pthread? Because i removed that line from the CMakeLists and also could use the library on Windows?

does it requires pthread? Because i removed that line from the CMakeLists and also could use the library on Windows?

On linux, we do need to link pthread lib (even though we're using the standard thread library), -- not sure whether other OS needs it? -- maybe I could have a try then.

@KevDi Now we don't need the pthread lib for windows/macOS. #107