Skip to content
Back to formatted view

Raw Message

Message-ID: <77EB52C6DD32BA4D87471DCD70C8D70001CE5850@NA-PA-VBE03.na.tibco.com>
Date: 2009-09-16T15:30:11Z
From: William Dunlap
Subject: Building R package with .c sub-routine files
In-Reply-To: <20090916163432.fbnaqwqz60oo4owk@web.supagro.inra.fr>

> -----Original Message-----
> From: r-devel-bounces at r-project.org 
> [mailto:r-devel-bounces at r-project.org] On Behalf Of 
> pleydell at supagro.inra.fr
> Sent: Wednesday, September 16, 2009 7:35 AM
> To: Kjell Konis
> Cc: r-devel at r-project.org
> Subject: Re: [Rd] Building R package with .c sub-routine files
> 
> > Create a file named Makevars in the same directory and put the  
> > following line in it:
> >
> > OBJECTS=file1.o
> >
> > Then R CMD SHLIB will only compile file1.c.
> >
> > Kjell
> 
> Great, that's done the job nicely.

Note that this will fail if your compiler makes object
files with a different suffix, say ".obj".  Using the
conventional '.h' for included files fixes this problem
and helps others understand your code more quickly.

Bill Dunlap
TIBCO Software Inc - Spotfire Division
wdunlap tibco.com  

> 
> Many thanks
> David
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>