我正试图从这里安装警报:https://web.tecgraf.puc-rio.br/lhf/ftp/lua/
我使用brew install lua
在macOS上安装了lua
当我进入库目录进行编辑时,结果如下
%> make
gcc -std=c99 -Wall -Wextra -Wfatal-errors -O2 -I/usr/local/include -o alarm.so -bundle -undefined dynamic_lookup lalarm.c
lalarm.c:12:10: fatal error: 'lua.h' file not found
#include "lua.h"
^~~~~~~
1 error generated.
homebrew在哪里安装lua.h文件?
我如何让它在默认情况下被make识别?
lua.h
不在/usr/local/include
中:
$ fd lua /usr/local/include
$
您需要配置CFLAGS
以包含/opt/homebrew/Cellar/lua/5.4.4_1/include/lua
:
$ fd lua.h /opt/homebrew/Cellar/lua/5.4.4_1
/opt/homebrew/Cellar/lua/5.4.4_1/include/lua/lua.h
/opt/homebrew/Cellar/lua/5.4.4_1/include/lua/lua.hpp
/opt/homebrew/Cellar/lua/5.4.4_1/include/lua5.4/lua.h
/opt/homebrew/Cellar/lua/5.4.4_1/include/lua5.4/lua.hpp