From a2513b083a04a11187a26f9f752094c988775f95 Mon Sep 17 00:00:00 2001
From: Ian Bell
Date: Tue, 10 Mar 2015 10:07:05 -0600
Subject: [PATCH] Added some information on manually compiling for R
This was the root of my problem, and it would have been good to have this clearly explained before.
---
Doc/Manual/R.html | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/Doc/Manual/R.html b/Doc/Manual/R.html
index 5de390eab..50e861b22 100644
--- a/Doc/Manual/R.html
+++ b/Doc/Manual/R.html
@@ -119,6 +119,23 @@ Without it, inheritance of wrapped objects may fail.
These two files can be loaded in any order
+
+ If you are compiling code yourself (not using R itself), there are a few things to watch out for:
+
+
+
+- The output shared library name (to the left of the file extension) MUST match the module name, or alternatively, you can also set the -package NAME command line argument. See swig -r -help for more information
+
- If you do not set the output file name appropriately, you might see errors like
+
+
+> fact(4)
+Error in .Call("R_swig_fact", s_arg1, as.logical(.copy), PACKAGE = "example") :
+ "R_swig_fact" not available for .Call() for package "example"
+
+
+ - Make sure the architecture of the shared library(x64 for instance), matches the architecture of the R program you want to load your shared library into
+
+
37.3 Precompiling large R files