2017-02-20 73 views
0

Saving CLOS objects中的sds的注释提供了对Common Lisp开放代码集合(CLOCC)文件(closio.lisp)的引用,用于可读地读取编写CLOS对象的&。有关安装该软件的说明,请参阅Installation of CLOCC。但是,以前没有使用过CLOCC,我希望为设置读/写CLOS对象设置一些额外的指导。以下是到目前为止我的init文件(.clinit)的附加内容:安装CLOCC&packages

(in-package :cl-user) 
(setq *clocc-root* "D:\\clocc\\") 
(load "D:\\clocc.fasl") 
(load 
    (compile-file ;warns about |make|::COMPILED-FILE-P being undefined 
    (translate-logical-pathname 
     "clocc:src;defsystem;defsystem"))) 
(dolist (s '("clocc:src;cllib;base" "clocc:src;port;sys")) 
    (mk:add-registry-location (translate-logical-pathname s))) 

有关如何添加下一个内容的说明,请重新参考。

+0

你遵循'安装说明'你链接到一步一步的文件?你需要使用'mk:oos'编译文件,然后加载你需要的任何文件,并且你很好。 – sds

+0

我试过的下两个语句是: '(mk:oos“cllib”:compile)''和'(mk:oos“port”:compile)' 但它们产生一个错误 - 例如,找不到系统名为“cllib”。另外,尝试'(mk:oos“src \\ cllib”)'目录所在的位置,但同样的错误。 – davypough

回答

1

说明已过时。抱歉。

installation instructions现在说(我删除你不需要的系统):

(compile-file "c:/gnu/clocc/clocc") ; or whatever ... 
(load *) 
;; * load the defsystem facility 
;; most lisps come with "asdf"; if this fails, get it yourself from 
;; https://common-lisp.net/project/asdf/ 
(require "asdf") 

;; * compile some systems 
(asdf:compile-system "port") 
(asdf:compile-system "cllib") 
... 

您将需要遵循asdf instructions

$ mkdir -p ~/.config/common-lisp/source-registry.conf.d/ 
$ echo '(:tree "c:/gnu/clocc/")' > asdf.conf 
+0

Doh,到二垒(使用Allegro CL)。编译mop.lisp(在端口中)时,'slot-definition-initargs'是未定义的函数,可以选择调用'mop:slot-definition-initargs'。这样做会对'class-direct-slots'产生相同的错误。 – davypough

+0

看起来像'port:mop'需要为最新的Allegro进行更新。我们需要一些来回。请用'port:mop.lisp'中第19行的':mop'替换':clos'。它现在工作吗? – sds

+0

在第19行(对于allegro)将':clos'改为':mop'对于'slot-definition-initargs'仍然会产生相同的错误。继续使用'mop:slot-definition-initargs',然后用'mop:class-direct-slots',然后获得错误:没有方法适用于通用函数#)。 – davypough

相关问题