Hello, I was able to create the Rdll.lib file. However, I get the following linking error message when I try to build my VC++ project.
The line that the linker is complaining about is calling the pnorm function. GenePoolAnalysis.obj : error LNK2019: unresolved external symbol _pnorm5 referenced in function... The offending line of code is PValue = 2*pnorm(-1.0*TestStatistic, 0.0, 1.0, 1, 0); Where you able to use R functions? Euxaristo :) Christos Hatzis wrote: > > Thank you. > > I am using the **free** Microsoft Visual C++ Toolkit 2003. The Rdll.lib > library builds successfully following the instructions in README.packages. > One potential caveat is that lib.exe that is needed to build the library > from R.exp is not part of the free toolkit. However, a workaround is > possible as 'lib' is equivalent to 'link /lib': > > pexports R.dll > R.exp > link /lib /def:R.exp /machine:x86 /out:Rdll.lib > > -Christos > > Christos Hatzis, Ph.D. > Nuvera Biosciences, Inc. > 400 West Cummings Park > Suite 5350 > Woburn, MA 01801 > Tel: 781-938-3830 > www.nuverabio.com > > > > -----Original Message----- > From: Prof Brian Ripley [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 05, 2006 1:42 AM > To: Christos Hatzis > Cc: r-devel@r-project.org > Subject: Re: [Rd] Library file for the R engine in Windows? > > This is discussed in README.packages: yes you do need to build an import > library for VC++6 (don't know for sure about later versions). The > recommended route is to build it from the sources, but pexports.exe from > mingw-utils can usually be used. > > On Mon, 4 Dec 2006, Christos Hatzis wrote: > >> Hi, >> >> I am trying to use dynamic memory allocation in the C code to be >> called by R through the .C interface. >> I have used R_alloc as explained in the Writing R Extensions and >> included the R.h header. >> The program compiles fine but fails when linking. Obviously it needs >> a library file where R_alloc is found. >> I have tried to link by adding R.dll to list of files at the end of >> the link command but that did not work either. >> >> The S Programming book mentions that a library Rdll.lib needs to be >> built from source, but I am not sure if this is still the recommended >> route. >> >> I am using Microsoft Visual C++ Toolkit in Windows XP Pro. >> Thank you for any advice. >> >> Christos Hatzis, Ph.D. >> Nuvera Biosciences, Inc. >> 400 West Cummings Park >> Suite 5350 >> Woburn, MA 01801 >> Tel: 781-938-3830 >> www.nuverabio.com <http://www.nuverabio.com/> >> >> >> >> [[alternative HTML version deleted]] >> >> ______________________________________________ >> R-devel@r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-devel >> > > -- > Brian D. Ripley, [EMAIL PROTECTED] > Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ > University of Oxford, Tel: +44 1865 272861 (self) > 1 South Parks Road, +44 1865 272866 (PA) > Oxford OX1 3TG, UK Fax: +44 1865 272595 > > ______________________________________________ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > > -- View this message in context: http://www.nabble.com/Library-file-for-the-R-engine-in-Windows--tf2757219.html#a13492792 Sent from the R devel mailing list archive at Nabble.com. ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel