Add windows compatibility - #5
Open
Tardigrade42 wants to merge 24 commits into
Open
Conversation
Since #include <sys/time.h> is not available on Windows and the Windows library does not provide the gettimeofday function, this little wrapper fixes this incompatibility.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change makes the project compatible to run natively on Windows as well. In addition to a general instruction on how to compile this program on Windows devices, this change needed to update the code to be completely Windows compatible. The main changes were:
andwith&&since it is not available on Windows)sys/time.hon Windows and add missing functiongettimeofdayfor Windowscmathconstants (likeM_PI) on Windowsmax-functionstd::unary_function<_Result, _Arg>CMakeLists.txtand add certain Windows-only settingssetup.pyand fix No module named Sphinx.setup_command #4shufflesyntax which is not available on Windowsgetoptlibrary with custom code, since the library does not exists on WindowsIn addition there are many warnings during the build, which might be fixed in the future. To see the initial errors during Windows compilation clearer, I suppressed these warnings. I left the code that way and added a
TODOcomment there.Personal Note
I checked the current setup on two different Windows 11 devices and it worked on both. So I am pretty confident, that the setup is correct. However I only have WSL at hand and no Linux or Mac. @nekonaute please confirm, that these changes do not effect your device, but I do not see any reason why the code should not run on MacOS or Linux.