From ... From: Erik Naggum Subject: Re: ffi in acl problems Date: 1999/08/10 Message-ID: <3143268274698278@naggum.no>#1/1 X-Deja-AN: 510994378 References: <7oor3u$jbg$1@cantuc.canterbury.ac.nz> mail-copies-to: never Organization: Naggum Software; +47 8800 8879; +1 510 435 8604; http://www.naggum.no Newsgroups: comp.lang.lisp * kjh63@cantua.canterbury.ac.nz (Kurt J Hausler) | 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. 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)))