p.dalgaard@biostat.ku.dk
1999-May-04 22:27 UTC
[R] R_problem_buf in the S.h files & lists in .C (PR#185)
Duncan Temple Lang <duncan@rice.research.bell-labs.com> writes:> I didn't see any mention of this in the material on CRAN. The two S.h > files define R_problem_buf as a real symbol rather than simply > declaring its existence. As a result, a shared library that links two > or more files that include this will get duplicate symbol complaints. > Since it is not defined elsewhere in the code, someone has to define it.[I'll file this as a bug report and take it off of R-help] Yes. This game is commonly played by the #ifdef __MAIN__ #define extern #endif and including the .h files in main.c. However, R doesn use that trick (not even for the declarations in Defn.h) for some reason that I don't quite see. A quick workaround could be to define the buffer in S_compat.c.> A secondly thing is the documentation for .C() and company. It omits > what type list() objects have when passed to a C routine. It should > read void *, which is actually a SEXP * in this case. (I know, I > should be using .External but I am trying to keep the code for the > different S's and R's together until I have to abandon things.)-- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._