我正在尝试在 macOS 上编译一个需要 gettext(对于 intltools)的程序。我尝试了以下命令来运行配置脚本:
LDFLAGS=-L/usr/local/opt/gettext/lib CPPFLAGS=-I/usr/local/opt/gettext/include ./configure
LDFLAGS=/usr/local/opt/gettext/lib CPPFLAGS=/usr/local/opt/gettext/include ./configure
Run Code Online (Sandbox Code Playgroud)
在第一种情况下,它失败并显示以下错误消息
configure: error: GNU gettext tools not found; required for intltool
Run Code Online (Sandbox Code Playgroud)
在后一种情况下,它找不到 C 编译器
解决此类问题的正确方法是什么?我了解这可能与此有关