如何在 mac 10.9.4 上使用 apue.h

如何在 mac 10.9.4 上使用 apue.h

我尝试在我的 mac 上编译来自 UNIX® 环境中的高级编程的源代码,但是之后make,编译因以下错误而退出:

... 
clang: error: unknown argument: '-R.' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make[1]: *** [t4] Error 1
make: *** [all] Error 1

答案1

这是一个 gcc 编译器的痛苦,“clang:错误:未知参数:‘-R’”,所以我通过更改“-R”解决了这个问题。到 /apue.3e/db/Makefile 中的“-R”:

像这样:

ifeq "$(平台)" "macos" EXTRALD=-R

相关内容