<div dir="ltr"><div><div><div><div><div><div>I don't think you need to worry about linking against the .dll files, as the<br></div>import libraries (.dll.a files) contain all of the information that the linker needs,<br>
</div>and you PATH will tell Windows where to find the corresponding dll's.<br></div>It is possible to link against the dll's without using import libs, <br>but then various tricks have to be used to specify what is <br>
exported from each dll.<br><br></div>I downloaded the source for 0.10.1 and it seems to build and install<br></div>ok provided I place Rcpp.dll on PATH. It would save the user some<br>trouble if PATH could be updated automatically, but it is probably not<br>
a good idea to have R package installation or startup update the users<br></div>environment...<br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Oct 7, 2013 at 10:52 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><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><div class="im">install.packages('RcppOctave', repos = c(getOption('repos'), '<a href="http://web.cbio.uct.ac.za/~renaud/CRAN'" target="_blank">http://web.cbio.uct.ac.za/~renaud/CRAN'</a>))<br>
</div></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="HOEnZb"><div class="h5"><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><div><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>
</div></div></blockquote></div><br></div>