[racket] Loading or Requiring a Module

From: Cody Eilar (cody.eilar at gmail.com)
Date: Mon Feb 10 16:20:15 EST 2014

Lately I have been using (require "myModule.rlt") to access some extensions
that I wrote in C. The caveat with this is that I have to put my extensions
in the "special" directory compiled/native/x86_64/3m. This will end up to
be a major problem because I need my extensions accessible from anywhere a
racket script is created on my machine.

In other words, what I would like to do is something like this:

(require "/path/to/myModule_rkt.so")

Now, if I don't make my c extension a module, I can do something similar to
this using (load-extension) but then the problem becomes that I can't run a
script. I am able to load my extension successfully from the racket command
line, but if I run racket myscript.rtk, it doesn't recognize any of the
extension functions, let alone the extension.

>From what I have read so far here :

http://docs.racket-lang.org/reference/eval.html#%28tech._compiled._load._handler%29

The only way to do what I want would be to copy that compiled directory
around from project to project and that's a real bummer.

Thanks for your help!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20140210/dc97e54f/attachment.html>

Posted on the users mailing list.