我尝试使用 ECL 创建一个 .o 文件,目的是使用其编译为 C 的功能,但是在尝试将程序构建为文档列表时收到错误消息。
我在跑步:
(c:build-program "CompiledFile" "hello.lisp")
收到错误:
Debugger received error of type: SIMPLE-ERROR
Cannot find the external symbol BUILD-PROGRAM in #<"C" package>.
Error flushed.
>> "CompiledFile"
>> "hello.lisp"
>> ;;; Warning: Ignoring an unmatched right parenthesis.
hello.lisp的内容如下:
(defun say-hello ()
(print "Hello, world"))
(say-hello)
(terpri)
(quit)
我正在关注此处找到的文档https://common-lisp.net/project/ecl/static/manual/ch34s03.html,它的函数定义为:
c:build-program {image-name &key lisp-files ld-flags prologue-code epilogue-code}