From edd at debian.org  Sun Feb 19 21:36:59 2012
From: edd at debian.org (Dirk Eddelbuettel)
Date: Sun, 19 Feb 2012 14:36:59 -0600
Subject: [Rd] include <R.h>
In-Reply-To: <4F4156C6.90401@gmail.com>
References: <4F415146.6020508@gmail.com>
	<20289.21669.268394.103016@max.nulle.part>
	<4F4156C6.90401@gmail.com>
Message-ID: <20289.23915.634711.608570@max.nulle.part>


On 19 February 2012 at 15:08, Paul Gilbert wrote:
| 
| 
| On 12-02-19 02:59 PM, Dirk Eddelbuettel wrote:
| >
| > On 19 February 2012 at 14:45, Paul Gilbert wrote:
| > | I am trying to add
| > |
| > | #include<R.h>
| > |
| > | to a .c file in one of my package, so I can call error() without a
| >
| > You may want to turn 'remapping' on which hides all R functions behind a
| > prefix of Rf_ so that error() becomes Rf_error().  Define R_NO_REMAP before
| > including R.h and you should be fine.
| 
| I'm confused about why this will help the compiler find the R.h file?

Never mind -- my bad. 

I seem to have misread the question. Remapping helps with R's error(),
length(), ... clash with similarly defined functions from other projects.

Dirk
 
| Paul
| 
| >
| > Hth, Dirk
| >
| > | complaint about implicit defined function. The src/ has a Makefile, to
| > | build some exec/ files that are needed. Without the include, my Makefile
| > | target
| > |
| > | OBJS = $(SRC:.c=.o)
| > |
| > | $(PKGNAME).so: $(OBJS) rpcx.h
| > | 	$(R_HOME)/bin/R CMD SHLIB  $(OBJS)
| > |
| > | seems to work fine, and I do not need a target for the .o's, the default
| > | works. But when I add the include, the location of R.h does not get
| > | passed along. How am I suppose to specify $(R_HOME)lib/R/include so that
| > | it gets passed along by R CMD SHLIB ?
| > |
| > | Paul
| > |
| > | ______________________________________________
| > | R-devel at r-project.org mailing list
| > | https://stat.ethz.ch/mailman/listinfo/r-devel
| >

-- 
"Outside of a dog, a book is a man's best friend. Inside of a dog, it is too
dark to read." -- Groucho Marx



[Rd] include <R.h>
Dirk Eddelbuettel