> -----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] 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@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel