Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ffi in acl problems

5 views
Skip to first unread message

Kurt J Hausler

unread,
Aug 10, 1999, 3:00:00 AM8/10/99
to
Hello. I have a dll that has functions that I am trying to load into lisp but the function (def-foreign-call ) doesnt seem to work:

(def-foreign-call CreateDatabase () :returning :foreign-address)
CREATEDATABASE
USER(59): (createdatabase)
Error: Attempt to call #("createdatabase" 1669872020 0 2 1669872020) for which
the definition has not yet been (or is no longer) loaded.
[condition type: SIMPLE-ERROR]

Now the dll has been loaded with :ld peval.dll and if it hadnt the (def-foreign-call ) would have caused an error, so I'm not sure whats wrong here. Its quite clear to me that the function has been half defined sort of.

Any suggestions?

Thanks

Kurt


Erik Naggum

unread,
Aug 10, 1999, 3:00:00 AM8/10/99
to
* kj...@cantua.canterbury.ac.nz (Kurt J Hausler)

the error message is a dead give-away that it's calling the wrong
function. instead, try

(def-foreign-call (create-database "CreateDatabase") ()
:returning :foreign-address)

also note that you're much better off always specifying Lisp name as a
symbol and foreign name as a string literal, since you really don't want
to mix naming conventions between languages. the case hypersensitivity
of C and Unix in general is a bug that there is no need to perpetuate.

#:Erik
--
(defun pringles (chips)
(loop (pop chips)))

0 new messages