kpocza / LoWe

Linux on Windows extender
MIT License
244 stars 17 forks source link

Does not build successfully on WSL (Ubuntu 16.04) #2

Closed ghost closed 7 years ago

ghost commented 7 years ago

The project does not build unless unistd.h is included in a few device-related files. Errors are as follows:

make
mkdir -p obj
mkdir -p obj/DeviceHandlers/
mkdir -p out
g++ DeviceHandler.cpp -c -o obj/DeviceHandler.o -std=c++11 -Wall -I. -IDeviceHandlers
DeviceHandler.cpp: In member function ‘bool DeviceHandler::HasPermissions() const’:
DeviceHandler.cpp:91:31: error: ‘R_OK’ was not declared in this scope
  if(access(_openpath.c_str(), R_OK|W_OK) < 0)
                               ^
DeviceHandler.cpp:91:36: error: ‘W_OK’ was not declared in this scope
  if(access(_openpath.c_str(), R_OK|W_OK) < 0)
                                    ^
DeviceHandler.cpp:91:40: error: ‘access’ was not declared in this scope
  if(access(_openpath.c_str(), R_OK|W_OK) < 0)
                                        ^
Makefile:25: recipe for target 'obj/DeviceHandler.o' failed
make: *** [obj/DeviceHandler.o] Error 1
kpocza commented 7 years ago

Thank you for the PR. Although Ubuntu 16.04 is not officially supported yet by MS on WSL, it made LoWe more future proof.