安装OIS后如何解决这些问题?

安装OIS后如何解决这些问题?

我正在尝试在 Ubuntu 13.10 上安装 OIS,因为我正在尝试安装 orgre,因为我正在尝试安装 FreeOrion。无论如何,这是我正在关注的页面:关联在步骤 1.1 的“make”步骤中失败,并显示以下错误消息:

./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);
                    ^
make[1]: *** [LinuxJoyStickEvents.lo] Error 1
make[1]: Leaving directory `/home/alexander/opt/src/ois-v1-3/src'
make: *** [all-recursive] Error 1

我该如何解决这个问题?也许有一种方法可以安装oisapt-get甚至可以直接安装,orgreapt.get无需绕道“configure/make/make install”?

答案1

简而言之:它可以通过以下方式获得apt-get

 sudo apt-get install libois-dev

和/或

 sudo apt-get install libois-1.3.0

长: 根据引导带和配置中的所有警告,我认为它有点旧了。这回购协议尽管有一些分叉,但已经 5 年左右没有碰过了。

至于通过 apt 安装 ogre 也是可以的,但它是一个旧版本。可通过 ppa 获取PPA:食人魔团队/食人魔

相关内容