<div dir="ltr"><div><div><div><div><div>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. <br>
<br></div>In other words, what I would like to do is something like this: <br><br></div>(require "/path/to/myModule_rkt.so") <br><br></div>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. <br>
<br>From what I have read so far here :<br><br><a href="http://docs.racket-lang.org/reference/eval.html#%28tech._compiled._load._handler%29">http://docs.racket-lang.org/reference/eval.html#%28tech._compiled._load._handler%29</a><br>
<br></div>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. <br><br></div>Thanks for your help! <br></div>