<div dir="ltr"><div><div>Thanks Matthew, <br><br></div> That's exactly what I am looking for!<br><br></div>~Cody <br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Feb 11, 2014 at 5:47 AM, Matthew Flatt <span dir="ltr"><<a href="mailto:mflatt@cs.utah.edu" target="_blank">mflatt@cs.utah.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You should create a collection to hold your module:<br>
<br>
<a href="http://docs.racket-lang.org/guide/module-basics.html#%28part._link-collection%29" target="_blank">http://docs.racket-lang.org/guide/module-basics.html#%28part._link-collection%29</a><br>
<br>
If you create "myCollection" and put "myModule_rkt.so" in<br>
<br>
myCollection/compiled/native/x86_64/3m/<br>
<br>
then you'll be able to import it from anywhere using<br>
<br>
(require myCollection/myModule)<br>
<div><div class="h5"><br>
<br>
<br>
At Mon, 10 Feb 2014 11:20:15 -1000, Cody Eilar wrote:<br>
> Lately I have been using (require "myModule.rlt") to access some extensions<br>
> that I wrote in C. The caveat with this is that I have to put my extensions<br>
> in the "special" directory compiled/native/x86_64/3m. This will end up to<br>
> be a major problem because I need my extensions accessible from anywhere a<br>
> racket script is created on my machine.<br>
><br>
> In other words, what I would like to do is something like this:<br>
><br>
> (require "/path/to/myModule_rkt.so")<br>
><br>
> Now, if I don't make my c extension a module, I can do something similar to<br>
> this using (load-extension) but then the problem becomes that I can't run a<br>
> script. I am able to load my extension successfully from the racket command<br>
> line, but if I run racket myscript.rtk, it doesn't recognize any of the<br>
> 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._handle" target="_blank">http://docs.racket-lang.org/reference/eval.html#%28tech._compiled._load._handle</a><br>
> r%29<br>
><br>
> The only way to do what I want would be to copy that compiled directory<br>
> around from project to project and that's a real bummer.<br>
><br>
> Thanks for your help!<br>
</div></div>> ____________________<br>
> Racket Users list:<br>
> <a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
</blockquote></div><br></div>