rdepena / node-dualshock-controller

Eventing API layer over HID for the Sony DualShock 3 and DualShock 4 controllers
208 stars 46 forks source link

was not declared in this scope #78

Open victorbnl opened 6 years ago

victorbnl commented 6 years ago

I have many errors like bluetooth.cpp:291:17: error: ‘close’ was not declared in this scope close(sk); ^~~~~ :/ On Ubuntu 18.04 LTS

mstr3336 commented 6 years ago

I get the same problems- I started editing the original code to #include <unistd.h>, but I get the feeling that downgrading your g++ compiler to <4.7 may be the trick, https://gcc.gnu.org/gcc-4.7/porting_to.html https://stackoverflow.com/a/37734860

Alternatively - Just keep bashing your head against adding that '#include ' line to any and all .cpp files that throw errors at you until eventually you stop getting errors. Worked for me, after changing maybe 4-6 files.