diag-client-lib icon indicating copy to clipboard operation
diag-client-lib copied to clipboard

Build diag-client lib on windows platform

Open Iandiehard opened this issue 1 year ago • 4 comments

Description:-

This story targets to build diag-client-lib on windows platform

Iandiehard avatar Sep 22 '23 12:09 Iandiehard

Hi! I'm be able to build diag-client library on Windows using MINGW-W64 GCC/CLANG compilers using your pull request for TLS support. Only one issue with building is calling pthread_setname_np.

Alexpux avatar Feb 26 '24 19:02 Alexpux

Hello @Alexpux ,

Thanks for trying to build diag-client-lib on windows platform.

I thought pthread_setname_np is a common function for setting thread name and can be used for windows too. Did you fix this issue when building it on windows?

Also Did you also build boost library for windows ? was it straight forward or some additional steps are needed?

If you are interested, I would request you to create a pull request on any extra changes you made to build diag-client-lib on windows. This shall also ease up my job :)

Just FYI:- The pull request for TLS support may not work as I have not yet tested it. So I would suggest to stick to master right now

Iandiehard avatar Feb 27 '24 10:02 Iandiehard

Hi, Im maintainer of MSYS2 project that provide toolchains and many prebuilded open source libraries for Windows users using package manager. So I'm use MSYS2 installation that already have boost library builded. I'm fix issue with pthread by reinterpret_cast<pthread_t> for native_handle.

Alexpux avatar Feb 27 '24 10:02 Alexpux

@Iandiehard also Windows MSVC compilers don't have PThreads API. Windows use its own threads model. Pthread API is not standart for Windows.

Alexpux avatar Feb 27 '24 16:02 Alexpux