<div dir="ltr"><div><div><div><div><div><div>Thanks for the details Dominick.<br></div>I think I got it working now, by ad Octave bin directory to the path prior loading RcppOctave library.<br></div><div>I tested it by renaming the Octave root directory into something different than at building time.<br>
<br></div><div>I added the option to specify Octave path via option octave.path (e.g., see ?OctaveInit), so that the package loads fine even if Octave is not installed/found. The user can also define this option in the .Rprofile if Octave is not installed in the path by default.<br>
</div><div><br></div>Please let me know if it works for you:<br><br></div>install.packages('RcppOctave', repos = c(getOption('repos'), '<a href="http://web.cbio.uct.ac.za/~renaud/CRAN'">http://web.cbio.uct.ac.za/~renaud/CRAN'</a>))<br>
</div>library(RcppOctave)<br></div>.O$rand()<br><br></div><div>Note that this version (0.10.1) was linked against the .dll.a files, but will load the .dll files... I will try later to link against the .dll files as you suggested.<br>
</div><div><br></div><div>Bests,<br></div>Renaud<br><div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 7 October 2013 16:24, Dominick Samperi <span dir="ltr"><<a href="mailto:djsamperi@gmail.com" target="_blank">djsamperi@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Yes, I placed Octave bin on my path. This is required to find its dll's for the same reason<br>
that Rcpp libs (directory containing Rcpp.dll) needs to be on PATH. If you enable clients<br>
</div>of RcppOctave.dll to link against functions provided by RcppOctave, then these clients<br>will have to add the RcppOctave libs directory to their PATH.<br><br></div>The Octave dll's must be in its bin directory due to another Windows dll search rule:<br>

</div>when you run an executable (like octave.exe) that depends on dll's, Windows will<br>resolve the dependencies when the dll's are in the same directory as the executable.<br><br></div><div>You should be able to link to liboctave-1.dll using '-loctave-1', provided the bin<br>

directory is on your PATH. The gcc '.dll.a' suffix means the file is an import library,<br></div><div>not a static lib or a shared lib. Import libs tell Windows how to resolve references<br></div><div>in the corresponding dll. Windows uses the '.lib' suffix for import libs. For your<br>

</div><div>purposes you should link against the dll's, not the dll.a's.<br><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Oct 7, 2013 at 4:59 AM, Renaud Gaujoux <span dir="ltr"><<a href="mailto:renaud@mancala.cbio.uct.ac.za" target="_blank">renaud@mancala.cbio.uct.ac.za</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Dominick, just to be sure: did you have Octave bin directory in your PATH when you tested the package?<br>

</div>Because Octave dlls are also in that directory. <br><br></div>I am getting confused on which path/dll is to be used  where. Currently I build RcppOctave.dll linking against the dll.a files found in "C:\Octave\Octave3.6.4_gcc4.6.2\lib\octave\3.6.4". But there are .dll files (although named liboctave-1.dll and not liboctave.dll as I would expect) in ""C:\Octave\Octave3.6.4_gcc4.6.2\bin" where octave.exe. and octave-config.exe also live.<br>


</div><div>I had tried loading the .dll.a files with dyn.load in R but got errors. The -1.dll files load fine, and might be the ones I could load manually in .onLoad.<br></div><div><br></div>Now, should I also link using the bin/ path and the -1.dll files?<span><font color="#888888"><br>


<br></font></span></div><span><font color="#888888">Renaud<br><div><div><br><br></div></div></font></span></div>
</blockquote></div><br></div></div></div></blockquote></div><br></div>