[Rd] How to customize the list of exported functions in a shared library

2007-02-05 Thread Vladimir Eremeev
Dear R users, I am writing binding from C library to R. I use R 2.4.1, windows XP, and MinGW. commands set PKG_CPPFLAGS="-I../sources" "-I." set PKG_LIBS="-Lc:/mingw/lib" -lfl -liberty set DEBUG=T R CMD SHLIB -d --output=Rsnns.dll [ list of all C sources] produce the DLL having all defined

Re: [Rd] How to customize the list of exported functions in a shared library

2007-02-05 Thread Andrew Piskorski
On Mon, Feb 05, 2007 at 01:28:24AM -0800, Vladimir Eremeev wrote: > I am writing binding from C library to R. > I use R 2.4.1, windows XP, and MinGW. > R CMD SHLIB -d --output=Rsnns.dll [ list of all C sources] > R CMD SHLIB -d --output Rsnns.dll Rsnns.c > -Wl,-Lc:/mingw/lib,-lfl,-L../sources,-

Re: [Rd] How to customize the list of exported functions in a shared library

2007-02-05 Thread Vladimir Eremeev
Andrew Piskorski wrote: > > On Mon, Feb 05, 2007 at 01:28:24AM -0800, Vladimir Eremeev wrote: >> I am writing binding from C library to R. >> I use R 2.4.1, windows XP, and MinGW. > >> R CMD SHLIB -d --output=Rsnns.dll [ list of all C sources] > >> R CMD SHLIB -d --output Rsnns.dll Rsnns.c >>

Re: [Rd] How to customize the list of exported functions in a shared library (update)

2007-02-05 Thread Vladimir Eremeev
Vladimir Eremeev wrote: > > > It calls gcc: > gcc "-I../sources" "-I." -IC:/PROGRA~1/R/include -gdwarf-2 -Wall -O2 > -std=gnu99 -c rsnns.c -o rsnns.o > gcc -shared -o Rsnns.dll Rsnns.def [ lots of *.o ] -LC:/PROGRA~1/R/bin > "-Lc:/mingw/lib" -lfl -liberty -lR > > The file Rsnns.def

Re: [Rd] How to customize the list of exported functions in a shared library

2007-02-05 Thread Prof Brian Ripley
It is a bit different on Windows, since it is making a DLL and GNU ld has lots of special-casing for those. To see how to do it, look at the standard package 'stats'. That has a .def file and it works. The naming convention is probably what you missed. (Also, things have changed since R 2.2.

Re: [Rd] How to customize the list of exported functions in a shared library (update)

2007-02-05 Thread Prof Brian Ripley
On Mon, 5 Feb 2007, Vladimir Eremeev wrote: > Vladimir Eremeev wrote: Something important is missing here! >> It calls gcc: >> gcc "-I../sources" "-I." -IC:/PROGRA~1/R/include -gdwarf-2 -Wall -O2 >> -std=gnu99 -c rsnns.c -o rsnns.o >> gcc -shared -o Rsnns.dll Rsnns.def [ lots of *.o ] -

[Rd] strange error message get from La.svd(X)

2007-02-05 Thread Lei Wu
Generator Microsoft Word 11 (filtered medium) Hi, I'm the mannova package maintainer. We used La.svd(X, method="dgesvd") in maanova package before. After R-2.3.0, the old La.svd() method was deprecated for option method="dgesvd". I changed maanova code correspondingly, which will call method="d

[Rd] Wrong vector size reported by error message

2007-02-05 Thread hpages
Hi, On my system, I get the following error message: > big <- 2:(2**30) Error: cannot allocate vector of size 0 Kb Note the wrong "size 0 Kb" in the message! Cheers, H. > sessionInfo() R version 2.5.0 Under development (unstable) (2007-01-05 r40386) i686-pc-linux-gnu locale: LC_CTYPE=en_

Re: [Rd] Problem using ofstream in C++ class in package for MacOS X

2007-02-05 Thread cstrato
Dear Jochen Thank you, there seems to be a problem with accessing memory but probably not in my simple program. Here are the essential parts: 1. R-function: "writeFileCpp" <- function(outfile=character(0)) { r <- .C("WriteFileCpp",as.character(outfile), PACKAGE="MyClass"); return(); } 2.

Re: [Rd] SEXP i/o, .Call(), and garbage collection.

2007-02-05 Thread K. B. Udaya
Thank you for the prompt and helpful replies. We're embarrassed to report that the problem was far more mundane: a lonely uninitialized integer pointer. On the bright side, we now have a far deeper understanding of SEXP i/o. Rest assured, the C-coding team (that would be me) has be duly spanked

Re: [Rd] Wrong vector size reported by error message

2007-02-05 Thread Oleg Sklyar
my R-SVN revision is 40458 compared to 40386 yours, could it be corrected already? * ~: R > 2**30 [1] 1073741824 > a<-2:1073741824 Error: cannot allocate vector of size 4194304 Kb > sessionInfo() R version 2.5.0 Under development (unstable) (2007-01-22 r40548) x86_64-unknown-linux-gnu locale:

Re: [Rd] Wrong vector size reported by error message

2007-02-05 Thread Peter Dalgaard
Oleg Sklyar wrote: > my R-SVN revision is 40458 compared to 40386 yours, could it be > corrected already? > > * ~: R > > 2**30 > [1] 1073741824 > > a<-2:1073741824 > Error: cannot allocate vector of size 4194304 Kb > There could be system dependencies. I get > a<-2:1073741824 > a<-2:(2**30)

[Rd] Build error with last R-devel tarball

2007-02-05 Thread hpages
Hi, On Windows, with last R-devel tarball (r40647) from ftp://ftp.stat.math.ethz.ch/Software/R/R-devel_2007-02-04.tar.gz I get the following build error: E:\biocbld\bbs-2.0-bioc\R\src\gnuwin32> make ... ... -- Making package utils adding build stamp to DESCRIPTION inst

Re: [Rd] Wrong vector size reported by error message

2007-02-05 Thread Oleg Sklyar
Herve, it looks like 64-bit. I just tried another 32 bit version: Windows build R-2.4.1 under VMWare on the same 64 bit Ubuntu as in my post above and Windows version shows the same bug as you report: R2.4.1 on Windows 2000 as guest system in VMWare Ubuntu 6.10 64bit --- > big <- 2:(2**

Re: [Rd] Wrong vector size reported by error message

2007-02-05 Thread Herve Pages
Oleg Sklyar wrote: > Herve, it looks like 64-bit. I just tried another 32 bit version: > Windows build R-2.4.1 under VMWare on the same 64 bit Ubuntu as in my > post above and Windows version shows the same bug as you report: > > R2.4.1 on Windows 2000 as guest system in VMWare Ubuntu 6.10 64bit >

Re: [Rd] Wrong vector size reported by error message

2007-02-05 Thread Herve Pages
Hi Oleg, Oleg Sklyar wrote: > my R-SVN revision is 40458 compared to 40386 yours, could it be > corrected already? No I don't think so. Maybe an architecture specific problem? You are on a 64-bit system, I'm on a 32-bit system. I was able to reproduce on 3 systems so far (with any version of R):

Re: [Rd] Wrong vector size reported by error message

2007-02-05 Thread Herve Pages
Herve Pages wrote: > Hi Oleg, > > Oleg Sklyar wrote: >> my R-SVN revision is 40458 compared to 40386 yours, could it be >> corrected already? > > No I don't think so. Maybe an architecture specific problem? > You are on a 64-bit system, I'm on a 32-bit system. > > I was able to reproduce on 3 sy

Re: [Rd] Build error with last R-devel tarball

2007-02-05 Thread Prof Brian Ripley
This was fixed in SVN within a few hours. Tarballs are snapshots, please check SVN before reporting problems. As I have said several times, please do not expect R-devel to build on all platforms at all times. On Mon, 5 Feb 2007, [EMAIL PROTECTED] wrote: > Hi, > > > On Windows, with last R-dev