You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

MacOS 13.5.2编译Joe/Jmacs编辑器报错该如何解决?

在Mac上编译安装jmacs编辑器(解决编译错误方案)

我偏爱Joe's Own Editor中的jmacs编辑器,但目前它没有原生Mac安装包,只能通过源码编译来使用。以下是完整的编译步骤,以及解决编译过程中报错的方法:

编译安装步骤

  • 执行配置命令,指定安装路径:
./configure --prefix=/usr/local --sysconfdir=/etc
  • 打开tty.c文件进行编辑:
sudo vi joe/tty.c
  • 在文件顶部附近添加如下头文件代码:
#include <util.h>
  • 执行编译安装命令:
sudo LC_ALL=C make install

解决的编译错误

上述操作可以避免编译时出现以下关于未声明函数的错误:

tty.c:975:6: error: call to undeclared function 'openpty'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

if (openpty(ptyfd, ttyfd, name, NULL, NULL) == 0) {
       ^

tty.c:975:6: note: did you mean 'openat'?
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/fcntl.h:600:9: note: 'openat' declared here

int     openat(int, const char *, int, ...) __DARWIN_NOCANCEL(openat) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0);
        ^

tty.c:1221:6: error: call to undeclared function 'login_tty'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

login_tty(1);

内容的提问来源于stack exchange,提问作者Andrew White

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.10 17:42:34