Den ons. 2. okt. 2019 kl. 15.31 skrev Hans Sjunnesson < hans.sjunnes...@gmail.com>:
> This is a hobby project of mine - a game in C, using SDL. I'd like to only > use C for the rendering part - rather use a scripting language for all of > the gameplay code. I want to try to use Racket for this - I've been doing > enough Clojure that I'm familiar with a lisp. My first approach was to > following along "Embedding into a Program" section of the Racket guide. But > I'm running into road blocks - and I can't find any good examples of > projects which embed Racket in a C program that calls functions in a Racket > environment. My initial plan was to define a Racket module that provided an > "init", an "update", and a "draw" function, then call those from the C > program. The embedding guide points me to using "raco" to generate a C > version of "racket/base", and that works - I can eval basic stuff, but I'm > getting an error when I (require "test.rkt"). So I'm guessing there's more > to be done with setting up the environment. > How do I compile the two test files? In the reddit thread you said, I should start with: raco ctool --c-mods base.c ++lib racket/base But what are the options for gcc and the linker? /Jens Axel -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/CABefVgzAAjXDc2871uc-VFrmLNGw%3DeJ3-w9QAj3frHXhvFrqCA%40mail.gmail.com.