mirage / alcotest

A lightweight and colourful test framework
ISC License
451 stars 80 forks source link

alcotest_stubs.c compile with MSVC #369

Closed jonahbeckford closed 1 year ago

jonahbeckford commented 1 year ago

unistd.h is not present in Windows SDK (MSVC) and usually unnecessary.

Before:

========= [TROUBLESHOOTING] alcotest-3480-337052.out ===========

[alcotest-3480-337052.out] File "src/alcotest/dune", line 6, characters 9-23:
[alcotest-3480-337052.out] 6 |   (names alcotest_stubs))
[alcotest-3480-337052.out]              ^^^^^^^^^^^^^^
[alcotest-3480-337052.out] (cd _build/default/src/alcotest && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\HostX64\x64\cl.exe" -nologo -O2 -Gy- -MD -D_CRT_SECURE_NO_DEPRECATE -nologo -O2 -Gy- -MD -I D:/.opam/dkml/lib/ocaml -I D:\.opam\dkml\lib\astring -I D:\.opam\dkml\lib\fmt -I ../alcotest-engine /Foalcotest_stubs.obj -c alcotest_stubs.c)
[alcotest-3480-337052.out] alcotest_stubs.c
[alcotest-3480-337052.out] alcotest_stubs.c(4): fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory
samoht commented 1 year ago

Thanks! I trust @TheLortex and @MisterDA on this :-)