Blame | Last modification | View Log | Download | RSS feed
Building from a source-code library under Windows=================================================First collect the tools that you need.EITHERThe cygwin-B20 set of tools available fromhttp://sourceware.cygnus.com/cygwin and several mirrors, the Fortranadditions ecgs-1.1-f77.tar.gz from that page or directly fromhttp://www.xraylith.wisc.edu/~khan/software/gnu-win32/ and the Fortranlibrary libg2c.mingw32.a.bz2 from CRAN/bin/windows/Windows-NT/etc.You can also use the egcs-1.1.x update (which contains Fortran) from thelink on the Cygwin site.Do remember to set MAKE_MODE to UNIX.ORThe mingw32 port of egcs-1.1 (or 1.1.2) fromftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/mingw32, theld.exe and cygwin1.dll from the B20 set in your path ahead of themingw32 binaries (if you don't want to download all the B20 distribution,you can find the two files inCRAN/bin/windows/Windows-NT/base/etc/ld.cygwin.zip).Suitable versions of rm, sed, mkdir, echo, cp and cat, for example(Win 9x) from the djtools set at CRAN/bin/windows/Windows-NT/base/etcor (Win 9x or NT) a cygwin set.perl5, available via http://www.perl.com/CPAN/ports.groff, available at http://www.itribe.net/virtunix/groff-1.10nt.zip.All of these need to be installed and in your path, and theappropriate environment variables set. Thencd RHOME\src\gnuwin32and runmake libR.awhich will take several minutes (13 minutes on a 133MHz laptop with32Mb RAM, 1 minute on a 300MHz PII with 64Mb and a fast local disc).This only needs to be done once.For each package you want to install, unpack it to a directory, saymypkg, in RHOME\src\library,cd RHOME\src\gnuwin32make pkg-mypkgThe makefiles can be customized: in particular the name of the DLL canbe set (see the line integrate-DLLNM=adapt) and the compile flags canbe set (see the examples in MakeDll).Using zipped help files=======================You will need zip installed, of course. Just runmake ziponly-mypkgafter building it. Target `ziphelp-mypkg' will make the zip filesbut not remove the separate files: this can be used for testing.Checking packages=================The equivalent of `R CMD check mypkg' on Unix ismake pkgcheck-mypkgThis runs all the examples in the help files.Using Visual C++================You may if you prefer use Visual C++ to make the DLLs. First build theimport library R.lib bylib /def:R.defThen you can compile the objects and build the DLL bycl /MT /Ox /D "WIN32" /c *.clink /dll /out:mypkg.dll *.obj R.lib(at least under VC++ 4.2). If the C sources use R header files youwill need to arrange for these to be searched, perhaps by/I ../../../include