小编gho*_*sjr的帖子

代码在SLIME + SBCL中运行,但不是普通的SBCL

我一直在试图建立一个lispy接口的CFFI绑定(https://gitorious.org/dh-misc/hdf5/source/cb616fd619a387e3cdc927994b9ad12b6b514236 :)但我跑到哪里代码正确运行在泥的情况下,其具有SBCL instance作为后端,但只要我在SBCL中运行代码就不会运行.

所以,我创建了一个测试用例文件来演示错误:

(asdf:load-system :cffi)
;;(asdf:operate 'asdf:load-op :cffi)

(defpackage :hdf5test
  (:use :cl :cffi)
  (:export :test))

(in-package :hdf5test)

(define-foreign-library hdf5
    (t (:default "libhdf5")))

(use-foreign-library hdf5)

;; hdf types:

(defctype size-t :uint)
(defctype hid-t :int)
(defctype herr-t :int)
(defctype hsize-t :uint64)

;; hdf constants:

;; H5S_UNLIMITED: 2^64-1
(defconstant +H5S-UNLIMITED+ 18446744073709551615)

;; H5F_ACC_TRUNC
(defconstant +H5F-ACC-TRUNC+ 2) ;; we'll see if it works

;; H5P_DEFAULT
(defconstant +H5P-DEFAULT+ 0)

;; H5T types:

(defconstant +H5P-DATASET-CREATE+ 150994953)
(defconstant +H5T-NATIVE-INT+ 50331660)

;; hdf functions:

;; H5Screate_simple …
Run Code Online (Sandbox Code Playgroud)

sbcl common-lisp slime hdf5 cffi

6
推荐指数
1
解决办法
331
查看次数

标签 统计

cffi ×1

common-lisp ×1

hdf5 ×1

sbcl ×1

slime ×1