Я хочу построить OIS версии 1.3 под ubuntu 16.04. Когда я делаю "make", я получаю следующую ошибку?
Making all in src make[1]: Entering directory '/home/mina/Downloads/ois-v1-3/src' /bin/bash ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../includes -I../includes -g -O2 -I/usr/X11R6/include -g -O2 -MT LinuxJoyStickEvents.lo -MD -MP -MF .deps/LinuxJoyStickEvents.Tpo -c -o LinuxJoyStickEvents.lo `test -f './linux/LinuxJoyStickEvents.cpp' || echo './'`./linux/LinuxJoyStickEvents.cpp libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../includes -I../includes -g -O2 -I/usr/X11R6/include -g -O2 -MT LinuxJoyStickEvents.lo -MD -MP -MF .deps/LinuxJoyStickEvents.Tpo -c ./linux/LinuxJoyStickEvents.cpp -fPIC -DPIC -o .libs/LinuxJoyStickEvents.o ./linux/LinuxJoyStickEvents.cpp: In member function ‘virtual void OIS::LinuxJoyStick::capture()’: ./linux/LinuxJoyStickEvents.cpp:100:77: error: ‘read’ was not declared in this scope int ret = read(mJoyStick, &js, sizeof(struct input_event) * JOY_BUFFERSIZE); ^ ./linux/LinuxJoyStickEvents.cpp: In static member function ‘static OIS::JoyStickInfoList OIS::LinuxJoyStick::_scanJoys()’: ./linux/LinuxJoyStickEvents.cpp:275:13: error: ‘close’ was not declared in this scope close(fd); ^ ./linux/LinuxJoyStickEvents.cpp:283:12: error: ‘close’ was not declared in this scope close(fd); ^ ./linux/LinuxJoyStickEvents.cpp: In static member function ‘static void OIS::LinuxJoyStick::_clearJoys(OIS::JoyStickInfoList&)’: ./linux/LinuxJoyStickEvents.cpp:294:20: error: ‘close’ was not declared in this scope close(i->joyFileD); ^ Makefile:483: recipe for target 'LinuxJoyStickEvents.lo' failed make[1]: *** [LinuxJoyStickEvents.lo] Error 1 make[1]: Leaving directory '/home/mina/Downloads/ois-v1-3/src' Makefile:441: recipe for target 'all-recursive' failed make: *** [all-recursive] Error 1
Что я уже пробовал:
make CC=gcc-4.4 CPP=g++-4.4 CXX=g++-4.4 LD=g++-4.4
Making all in src make[1]: Entering directory '/home/mina/Downloads/ois-v1-3/src' /bin/bash ../libtool --tag=CXX --mode=compile g++-4.4 -DHAVE_CONFIG_H -I. -I../includes -I../includes -g -O2 -I/usr/X11R6/include -g -O2 -MT LinuxJoyStickEvents.lo -MD -MP -MF .deps/LinuxJoyStickEvents.Tpo -c -o LinuxJoyStickEvents.lo `test -f './linux/LinuxJoyStickEvents.cpp' || echo './'`./linux/LinuxJoyStickEvents.cpp libtool: compile: g++-4.4 -DHAVE_CONFIG_H -I. -I../includes -I../includes -g -O2 -I/usr/X11R6/include -g -O2 -MT LinuxJoyStickEvents.lo -MD -MP -MF .deps/LinuxJoyStickEvents.Tpo -c ./linux/LinuxJoyStickEvents.cpp -fPIC -DPIC -o .libs/LinuxJoyStickEvents.o ../libtool: line 1763: g++-4.4: command not found Makefile:483: recipe for target 'LinuxJoyStickEvents.lo' failed make[1]: *** [LinuxJoyStickEvents.lo] Error 1 make[1]: Leaving directory '/home/mina/Downloads/ois-v1-3/src' Makefile:441: recipe for target 'all-recursive' failed make: *** [all-recursive] Error 1
Richard MacCutchan
В исходном коде есть ошибки, поэтому вам нужно вернуться к тому месту, где вы получили этот дистрибутив, чтобы посмотреть, был ли он исправлен.