ChrisKnott / Algojammer

An experimental code editor for writing algorithms
Apache License 2.0
2.92k stars 107 forks source link

Installation on Windows #7

Open bradrn opened 5 years ago

bradrn commented 5 years ago

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 #included at all, or does commenting out this line cause some subtle error that I'm missing?

ChrisKnott commented 5 years ago

I probably included that header for some debugging purpose and forgot to remove it.

The quality of this codebase is not guaranteed!

bradrn commented 5 years ago

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.