[Rcpp-devel] RcppOctave on Windows: testing needed

Renaud Gaujoux renaud at mancala.cbio.uct.ac.za
Mon Oct 7 16:52:00 CEST 2013


Thanks for the details Dominick.
I think I got it working now, by ad Octave bin directory to the path prior
loading RcppOctave library.
I tested it by renaming the Octave root directory into something different
than at building time.

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.

Please let me know if it works for you:

install.packages('RcppOctave', repos = c(getOption('repos'), '
http://web.cbio.uct.ac.za/~renaud/CRAN'))
library(RcppOctave)
.O$rand()

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.

Bests,
Renaud



On 7 October 2013 16:24, Dominick Samperi <djsamperi at gmail.com> wrote:

> Yes, I placed Octave bin on my path. This is required to find its dll's
> for the same reason
> that Rcpp libs (directory containing Rcpp.dll) needs to be on PATH. If you
> enable clients
> of RcppOctave.dll to link against functions provided by RcppOctave, then
> these clients
> will have to add the RcppOctave libs directory to their PATH.
>
> The Octave dll's must be in its bin directory due to another Windows dll
> search rule:
> when you run an executable (like octave.exe) that depends on dll's,
> Windows will
> resolve the dependencies when the dll's are in the same directory as the
> executable.
>
> You should be able to link to liboctave-1.dll using '-loctave-1', provided
> the bin
> directory is on your PATH. The gcc '.dll.a' suffix means the file is an
> import library,
> not a static lib or a shared lib. Import libs tell Windows how to resolve
> references
> in the corresponding dll. Windows uses the '.lib' suffix for import libs.
> For your
> purposes you should link against the dll's, not the dll.a's.
>
>
>
> On Mon, Oct 7, 2013 at 4:59 AM, Renaud Gaujoux <
> renaud at mancala.cbio.uct.ac.za> wrote:
>
>> Dominick, just to be sure: did you have Octave bin directory in your PATH
>> when you tested the package?
>> Because Octave dlls are also in that directory.
>>
>> 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.
>> 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.
>>
>> Now, should I also link using the bin/ path and the -1.dll files?
>>
>> Renaud
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20131007/c9374c39/attachment.html>


More information about the Rcpp-devel mailing list