For the fun of it, I tried hacking winpthreads to have it build on MSVC. So far I have created a custom CMakeLists.txt and ported the autotools build system to CMake. However, on my first build attempt, I get numerous errors in the public header files. Turns out MSVC doesn't allow for __declspec
attribute to come after the type name. Is it possible to move it before the type name?
Hello,
I think it would be better to keep them for gcc at the place they are
... gcc is sadly a bit picky about the place for it ... as VC is too.
But why not using macro specific for gcc, and another set for VC,
which are placed at their most beloved places?
Btw great that you try to port winpthread for VC :)
Cheers,
Kai
Am Fr., 27. Nov. 2020 um 16:55 Uhr schrieb Long Nguyen
kurumigaming@users.sourceforge.net:
Related
Bugs: #866
Let me check to see if
__declspec(dllexport)
can be put before the typename on GCC. If it's possible then I'll change all of it.Also, does winpthreads on GCC passes all the tests in the test_pthread folder?
Long Nguyen
Last edit: Long Nguyen 2020-12-03
I just tested having
__declspec(dllexport)
before type names with both clang and gcc and it seems to work on both of them.Code used:
Long Nguyen