I am using a dll I built in Visual Studio 2008 from the most recent source code. It is set to "Release DLL", with the product being a dll instead of a static library, and it is supposed to create a multi-threaded DLL. I have CHIPMUNK_FFI defined in chipmunk.h, so it is definitely getting to the MAKE_REFs. According to Visual Studio, it is going down the define path to "#define MAKE_REF(name)". (I'm pretty sure those are the most pertinent settings, let me know if you need more details)
Currently the exact error I am getting is:
ffi-obj: couldn't get "cpvadd" from "chipmunk.dll" (The specified procedure could not be found.; errno=127)
It seems to be loading the actual dll fine, as that would be a different error (which I dealt with), but it's like the functions do not exist to it.
Here is the code I am using to attempt to load the dll and function:
Code: Select all
#lang scheme
(require ffi/unsafe
ffi/unsafe/define)
(define chipmunk (ffi-lib "./chipmunk"))
(define-ffi-definer define-chipmunk chipmunk)
(define _cpFloat _double)
(define cpFloat? real?)
(define _cpDataPointer _pointer)
(define _size_t _ulong)
(define _cpHashValue _size_t)
(define-cstruct _cpVect
([x _cpFloat]
[y _cpFloat]))
(define cpv
(get-ffi-obj "cpvadd" chipmunk (_fun _cpVect _cpVect -> _cpVect)))