Hello,<div><br></div><div>what&#39;s the incantation needed to make the following work:</div><div><br></div><div>========</div><div><div>#lang racket</div><div><br></div><div>(provide sofa-version)</div><div><br></div><div>
(require ffi/unsafe)</div><div>(require ffi/unsafe/define)</div><div>(require racket/runtime-path)</div><div><br></div><div>(define sofa-version &quot;20120301_a&quot;)</div><div><br></div><div>(define arch</div><div>  (if (fixnum? #e10e15) &#39;x64 &#39;x86))</div>
<div><br></div><div>;; Access a file &quot;data.txt&quot; at run-time that is originally</div><div>;; located in the same directory as the module source file:</div><div>(define-runtime-path sofa.dll </div><div>  (format &quot;sofa-~a-~a.dll&quot; sofa-version arch))</div>
<div><br></div><div>(define-ffi-definer define-sofa (ffi-lib sofa.dll))</div></div><div>========</div><div><br></div><div>Please note that sofa-version is exported. I would like to not have to write this constant string in two places.</div>
<div>(This is working if I copy manually the two constants in the format).</div><div><br></div><div>Also, since I am at it: putting the dll in the same directory as the interface module or the executable is a satisfactory solution for my needs. But if I want to distribute this package to others, what should I use as argument to the ffi-lib function, to make everyone happy?</div>
<div><br></div><div>Thanks!</div><div>P.</div><div><br></div>