Algojammer
Algojammer copied to clipboard
Installation on Windows
When I try to install this on Windows, I get the following error:
C:\Users\bradn\Downloads\Algojammer\c_ext> python setup.py build install
running build
running build_ext
building 'algorecord' extension
...
(lots of output)
...
recorder.cpp
recorder.cpp(4): fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.15.26726\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
This is because the unistd.h
library is not available on Windows. Surprisingly however, it turns out that if I simply comment out the #include "unistd.h"
line in recorder.cpp
, everything starts to work. If this header file is not used, then why is it #include
d at all, or does commenting out this line cause some subtle error that I'm missing?
I probably included that header for some debugging purpose and forgot to remove it.
The quality of this codebase is not guaranteed!
Thank you for clarifying. But actually, I've just remembered it got even weirder than that: several other files included the same header, but it doesn't seem to trigger any errors in those files.