An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/r-help/attachments/20041111/db357e62/attachment.pl
problem building an R package under Windows XP with calls to
2 messages · Romain Neugebauer, Brian Ripley
Please do read the posting guide: that clearly indicates you sent this to the wrong list.
On Thu, 11 Nov 2004, Romain Neugebauer wrote:
[Comments removed about how you didn't know how to use VC++, a compiler we don't recommend but for which e.g. `S Programming' has extensive examples.]
I this more complex package, I use several calls to "printf" in the C program of that package. I also use "cat" calls in the R function of the package. It turns out that all calls to "cat" work without problem whereas calls to "printf" always fail (i.e. nothing is displayed in R). What is also interesting is that the calls to "printf" are however all displayed after I quit R. So it looks like it is R that does not allow my C program to display text on the standard output. This is very surprising because the simple package "test" I described above does work just fine even though it also uses "printf" calls.
The answer to your question is `use Rprintf'. Please read `Writing R Extensions', carefully, and you will be less surprised. Reading the rw-FAQ would help, too.
Brian D. Ripley, ripley at stats.ox.ac.uk 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 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595