Open gerazo opened 3 years ago
Clang has Windows binaries and can be used as a compiler on Windows. There is plenty of code in Clang which deal with all sorts of "MSVC Compatibility" issues. I'm not sure how strong it is, but in general, I think once I've seen someone using Clang on Windows personally and it worked.
GitHub Actions support running Windows containers for the build, they just cost 2x much to use.
@whisperity Thank you. Yes, indeed there is already Win support, so we could add this to the build.
I tried to build the current version on Windows and it worked well. Tools:
mkdir build_release
cd build_release
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ..
ninja
ninja test
Unfortonately some test cases failed in the TimerTest.cpp
, and it could not run the the white box tests, I think because of the static library linking (Exit code 0xc0000135
).
Error after running the command ctest --verbose
:
2: Test command: C:\informatika\git\pipert\build_release\pipert_wbtest.exe
2: Test timeout computed to be: 10000000
2/2 Test #2: pipert_wbtest ....................Exit code 0xc0000135
***Exception: 0.01 sec
Can you give the full console output? Secondary question: If we want a CI test on Win, should we use gcc or should we go for VC++?
@gerazo Depends on what you intend to support. You are building a library, so... I'm not sure how good GNU GCC's Windows compatibility implementation is. (Similarly, I'm not sure about Clang.) Because you're not building and packaging a self-contained program, these incompatibilities can bite one in the back pretty quickly.
Personally, I do not work on Windows (not with compilers, anyways), but I'd roll with either only MSVC, or actually both MSVC and GCC/Clang for the heck of it.
We should check how it is possible to compile, link and possibly develop the library on Windows. Question?
The main goal is to support native compilation and linking to an other project, so native usage is the priority, not native development. (it is ok to require a compatibility layer from devs.)