Re: [Rd] Building R package with .c sub-routine files

2009-09-16 Thread William Dunlap
> -Original Message- > From: r-devel-boun...@r-project.org > [mailto:r-devel-boun...@r-project.org] On Behalf Of > pleyd...@supagro.inra.fr > Sent: Wednesday, September 16, 2009 7:35 AM > To: Kjell Konis > Cc: r-devel@r-project.org > Subject: Re: [Rd] Buildi

Re: [Rd] Building R package with .c sub-routine files

2009-09-16 Thread pleydell
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. Many thanks David __ R-devel@r-project.org mailing list htt

Re: [Rd] Building R package with .c sub-routine files

2009-09-15 Thread Kjell Konis
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 On Sep 15, 2009, at 8:04 PM, pleyd...@supagro.inra.fr wrote: Lets say I have two source files file1.c and file2.c The latter just contain

Re: [Rd] Building R package with .c sub-routine files

2009-09-15 Thread Duncan Murdoch
On 9/15/2009 2:04 PM, pleyd...@supagro.inra.fr wrote: Lets say I have two source files file1.c and file2.c The latter just contains sub-routines to be used by the first. i.e. in file1.c I have the line #include "file2.c" That's not the normal way to program in C: normally you'd have a sepa

[Rd] Building R package with .c sub-routine files

2009-09-15 Thread pleydell
Lets say I have two source files file1.c and file2.c The latter just contains sub-routines to be used by the first. i.e. in file1.c I have the line #include "file2.c" Let's say "R CMD SHLIB file1.c" runs perfectly and I want to include the code in a package, "R CMD build" also runs fine but R