[Rd] Problem cross-compiling on Ubuntu

Dirk Eddelbuettel edd at debian.org
Tue Apr 14 22:21:46 CEST 2009


Harry,

On 14 April 2009 at 18:24, Harry Southworth wrote:
| I'm using Ubuntu 8.10 (Intrepid Ibex) and R 2.7.1.
                                            ^^^^^^^

[ You can also get R 2.8.1 for free, see the R FAQ and search Ubuntu, or go
  directly to http://cran.r-project.org/bin/linux/ubuntu ]

| I've built a package from source (a modified version of gbm) and it
| contains some C++ code.  I now want to cross-compile it to get a
| Windows version.
[...]
| [snip - everything fine up to here]
| i586-mingw32-g++ -isystem
| /home/harry/RLibrary/forWindows/cross-tools/i586-mingw32/include
| -I/home/harry/RLibrary/forWindows/WinR/R-2.6.0/include    -Wall -O2
                                         ^^^^^^^

So you are working with R 2.7,1 and R 2.6.0. May not be for the faint of
heart as some interfaces do change...

| -c adaboost.cpp -o adaboost.o
| In file included from dataset.h:20,
|                  from node_terminal.h:21,
|                  from distribution.h:20,
|                  from adaboost.h:20,
|                  from adaboost.cpp:3:
| buildinfo.h:8:19: R.h: No such file or directory
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

You may not get far til you get that sorted out -- you do need R.h from the
right place.

But as others have said, Rtools29.exe is fairly straightforward to use, esp
if you know how to use the R / gcc toolchain on Linux. And the win-builder is
also a very fine service.

Good luck, Dirk

-- 
Three out of two people have difficulties with fractions.



More information about the R-devel mailing list