Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8031313
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T01:03:44+00:00 2026-06-05T01:03:44+00:00

I am trying to use the Chipmunk physics library in Racket using the FFI

  • 0

I am trying to use the Chipmunk physics library in Racket using the FFI that it provides. However, I am currently having issues with actually getting the FFI to find the functions in the Chipmunk library, even though it seems to load the library correctly.

I am using the most recent version of Chipmunk (6.1.1) built on Windows 8 with Visual Studio 2008. I have the “CHIPMUNK_FFI” flag set so that the chipmunk_ffi.h file is loaded. I am building the code under the Release DLL configuration with “Multi-Threaded DLL” and “Build as a dll” optoins being used. The Racket code I am using is as follows:

#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)))

And I am getting the error:

ffi-obj: couldn't get "cpvadd" from "chipmunk.dll" (The specified procedure could not be found.; errno=127)

 === context ===
C:\Program Files (x86)\Racket\collects\ffi\unsafe.rkt:180:2: get-ffi-obj*
C:\Users\me.000\AppData\Roaming\Racket\planet\300\5.2.1\cache\jaymccarthy\chipmunk.plt\1\0\chipmunk-ffi-new.ss: [running body]
C:\Users\me.000\AppData\Roaming\Racket\planet\300\5.2.1\cache\jaymccarthy\chipmunk.plt\1\0\chipmunk-new.rkt: [traversing imports]
C:\Users\me.000\AppData\Roaming\Racket\planet\300\5.2.1\cache\jaymccarthy\chipmunk.plt\1\0\main.rkt: [traversing imports]
C:\Users\me.000\Dropbox\Code\workspace-racket\learning\main.rkt: [traversing imports]

Let me know if you need any further information. I would really appreciate some help with this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T01:03:48+00:00Added an answer on June 5, 2026 at 1:03 am

    Some functions (such as cpvadd are exported as _cpvadd).

    See http://code.google.com/p/chipmunk-physics/source/browse/trunk/include/chipmunk/chipmunk_ffi.h

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a squishy ball with Cocos2d and Chipmunk (via SpaceManager) using
so I am having some problems with chipmunk, please realize that I am new
I am trying use MySql and Entity Framework, using Connector/Net 6.1 with this as
Anyone know how to create a cvCreateStructuringElementEx using a image? I'm trying use opencv.cv.cvCreateStructuringElementEx()
I was trying use svn to find a checkin using svn log, but it
I'm trying use make a div's background transparent using a mixture of CSS3 rgba()
I'm trying use eco for client-side templating. I have multiple .eco templates that I'd
I have a regex that I'm trying use to validate against strings. Trying to
I have a 3rd party DLL that I am trying to use in a
I am trying use the jQuery table sorter plugin for a table that is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.