gerazo / pipert

Real-Time meets High-Delay: A hybrid scheduling and dataflow framework for DSP applications
GNU General Public License v3.0
6 stars 5 forks source link

Checking Windows compatibility #30

Open gerazo opened 3 years ago

gerazo commented 3 years ago

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.)

whisperity commented 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.

gerazo commented 3 years ago

@whisperity Thank you. Yes, indeed there is already Win support, so we could add this to the build.

ip1996 commented 3 years ago

I tried to build the current version on Windows and it worked well. Tools:

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
gerazo commented 3 years ago

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++?

whisperity commented 3 years ago

@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.