Hi racketeers,

I must be doing something wrong. I apologize for a very long explanation of
incongruities I find. What is the intended method of using shared libraries
in Racket so that
--- DrRacket works when the file is opened
--- DrRacket works when the file is opened from the recently used file list
--- DrRacket works when the file is opened through OS file associations
--- The executable works when created through DrRacket
--- The executable works when created through raco exe + raco distribute

I have a set of shared libraries from a vendor I cannot mess with. I load
one, it loads others. There is a directory for accessing these I'll call
"vendor-dir". In vendor-dir is a racket file I'll call "interface.rkt"
that, using the FFI, loads these libraries and provides an interface for
the purpose of my application. This is good when working with this racket
file.

However, in the main project directory is "main.rkt" which requires
"vendor-dir/interface.rkt". When I open "main.rkt" I have to have the
libraries relative to main.rkt, so I copy all of them out of "vendor-dir"
into my project directory.

This all only works when I launch DrRacket with no files, then open
"main.rkt". If I use the recently used file list, the library can't be
found in either of those locations. Also when opening via OS file
associations.

When I create the executable from DrRacket's menu item, the library can't
be found. OK, I alter the source to print out where it is looking for
libraries and put the DLLs there, but no dice. I have included these files
in the dialog box but no dice. OK, so forget "create executable."

I can only get the executable to work when I use raco exe, then raco
distribute, then move the DLLs to the top level where the executable is put.

I am guessing something like "define-runtime-path" is needed here and I
won't bore you with the various things I've tried, but ultimately I can
only succeed with the two methods described above. What am I supposed to be
doing differently?

Thanks,
Deren

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to