请教一个有关cffi的问题
lisp吧
全部回复
仅看楼主
level 3
zzk981 楼主
对于类似:
typedef int (SendChar)(char*, int, void*);
的定义,该如何调用?
stackoverflow上没找到类似问题,cffi文档里也没找到。
2018年09月01日 11点09分 1
level 3
zzk981 楼主
@只爱两个M
我跳过了,然后在没有init spice下直接执行spice_command
T211 201809091725 # cat 2.lisp
(format t
"
~S
~S
~S
~S
~S
~S
"
;(hun-sdcv "apple")
;(spice-init nil nil nil nil nil nil nil)
(spice-cmd "circbyline fail test")
(spice-cmd "circbyline V1 1 0 1")
(spice-cmd "circbyline R1 1 0 1")
(spice-cmd "circbyline .dc V1 0 1 0.1")
(spice-cmd "circbyline .end")
(spice-cmd "bg_run")
)
T211 201809091725 # sbcl --core s201809091725 --script 2.lisp
CORRUPTION WARNING in SBCL pid 4238(tid 0x7ffff7fc9700):
Memory fault at (nil) (pc=(nil), sp=0x7ffff6a567a8)
The integrity of this image is possibly compromised.
Exiting.
估计跟没初始化ngSpice_Init()有关系吧:
2018年09月19日 10点09分 3
level 6
2018年09月20日 01点09分 4
1