[Rd] wcstombs error when compiling package with Debian/Ubuntu

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Feb 10 23:03:35 CET 2010


Such errors are common when people use older versions of g++ to write 
their C++ code.  Later versions of g++ have somewhat stricter 
conformance to the C++ standards and catch some lax usage: we've seen 
it quite a lot for g++ 4.4.x and even more for pre-4.5.0.  In all the 
cases I have seen this message indicates a missing header.

wcstombs is a C99 function declared in <stdlib.h>: given that this 
looks like a C++ error message, did you include its C++ version, 
<cstdlib>?

Note that Mac OS X and (32-bit) WinXP are using g++ 4.2.x.  Also, what 
other headers a particular header includes is OS-dependent (and maybe 
even compiler-dependent): we have had a lot of trouble recently with 
<stdint.h> that some OSes (especially MinGW32) include from more 
common headers and some do not.

So this may be an OS issue but a compiler-version issue is more 
likely.


On Wed, 10 Feb 2010, cstrato wrote:

> Dear Debian/Ubuntu experts,
>
> For the second time users of my BioC package reported problems when trying to 
> compile it on Debian/Ubuntu.
>
> The error is always the same: "'wcstombs' was not declared in this scope", 
> see:
> https://www.stat.math.ethz.ch/pipermail/bioconductor/2010-February/031739.html
> https://stat.ethz.ch/pipermail/bioconductor/2009-August/029192.html
>
> Since I have no problems compiling my package on OpenSUSE11.1, MacOS X and 
> WinXP, I assume that maybe some development package may not be installed?
>
> Do you know what might be the reason for the compilation error on 
> Debian/Ubuntu?
> Which development headers/packages (glibc-headers, glibc-kernheaders??) need 
> to be installed on Debian/Ubuntu?
>
> Best regards
> Christian
> _._._._._._._._._._._._._._._._._._
> C.h.r.i.s.t.i.a.n   S.t.r.a.t.o.w.a
> V.i.e.n.n.a           A.u.s.t.r.i.a
> e.m.a.i.l:        cstrato at aon.at
> _._._._._._._._._._._._._._._._._._
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

-- 
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 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-devel mailing list