Compilation ECL-为每个编译单元及其依赖项转储c源代码?
我有下面的包定义。如何将所有组件及其依赖项递归编译到C源代码?换句话说,我想保留所有用于构建本机可执行文件的C文件 目前,我使用的是Compilation ECL-为每个编译单元及其依赖项转储c源代码?,compilation,lisp,asdf,ecl,Compilation,Lisp,Asdf,Ecl,我有下面的包定义。如何将所有组件及其依赖项递归编译到C源代码?换句话说,我想保留所有用于构建本机可执行文件的C文件 目前,我使用的是(asdf:makebuild:example,但这并没有留下任何C文件 我期待着见到你 simple.c simple.h simple.data cl-opengl.c cl-opengl.h ... 例如:asd: cl-opengl.asd: 正如ECL邮件列表中所解释的,将c::*delete files*设置为NIL将阻止编译器删除中间c文件。它们有扩
(asdf:makebuild:example
,但这并没有留下任何C文件
我期待着见到你
simple.c
simple.h
simple.data
cl-opengl.c
cl-opengl.h
...
例如:asd:
cl-opengl.asd:
正如ECL邮件列表中所解释的,将c::*delete files*设置为NIL将阻止编译器删除中间c文件。它们有扩展名*.c、*.eclh(头)和*.data(对象的文本定义),但它们的名称被ASDF篡改(它们得到一些ASDF前缀IIRC)它们不是在lisp源代码所在的地方创建的,而是在ASDF的缓存目录(通常为~/.cache/common lisp/ecl-…)您是否设法将生成的.c文件编译成独立的可执行文件?(我试图实现的是用交叉编译gcc交叉编译生成的.c文件)
(defsystem :example
:depends-on (:cl-opengl :cl-glu :cl-glut)
:serial t
:components ((:file "simple")))
(defsystem cl-opengl
:description "Common Lisp bindings to OpenGL."
:depends-on (cffi alexandria)
:components
((:module "gl"
:components
((:file "bindings-package")
(:file "constants" :depends-on ("bindings-package"))
(:file "library" :depends-on ("bindings-package"))
(:file "bindings" :depends-on ("bindings-package" "constants" "library"))
...