当前位置: 代码迷 >> 综合 >> mac安装bochs报错cdrom_osx.cc:194:18: error: assigning to 'char ' from incompatible type 'const ch
  详细解决方案

mac安装bochs报错cdrom_osx.cc:194:18: error: assigning to 'char ' from incompatible type 'const ch

热度:47   发布时间:2023-11-13 14:56:13.0

按照网上的配,一切都正常
[这里是配置的步骤](https://blog.nswebfrog.com/2017/02/03/config-bochs/)

但是就当我make的时候,去突然报错了,报错如下:

cdrom_osx.cc:194:18: error: assigning to 'char ' from incompatible type 'const ch

于是在网上查了一下,这个报错有个补丁[https://raw.githubusercontent.com/Homebrew/formula-patches/e9b520dd4c/bochs/xcode9.patch]

也就是把cdrom_osx.cc中出错的这一行
if ((devname = strrchr(devpath, '/')) != NULL) {
改为:
if ((devname = (char *) strrchr(devpath, '/')) != NULL) {
即可make和make install成功
注意有两点:1。make install 要在前面加上sudo
2。要安装bochs2.6.8版本,2.6.9版本这个错误解决完还有一大堆错误,为了缩短配置时间,建议用2.6.8版本的bochs吧。
成功打开bochs页面
在这里插入图片描述

  相关解决方案