Skip to content
Prev 27435 / 63424 Next

[rfc] Package to access the internal zlib library.

On Wed, 30 Jan 2008, jason at acm.org wrote:

            
Not so: R can be linked to the system's zlib, and otherwise uses its own 
copy which is not intended for use by packages.

Please check what 'Writing R Extensions' says about using undocumented 
entry points in R.  Ideally none of zlib would be visible, but some 
packages have been making use of undocumented entry points and we took 
pity on them.

Your package will not work as it does not include the header zlib.h, and 
e.g. Windows does not have it.  Expecting the system's zlib.h to work with 
R's internal copy is unsafe.

The *only* safe thing to do is to include your own copy of zlib, and 
compile it into the package (optionally linking instead to the system copy 
if it exists).
Please note that Uwe Ligges provides a Windows testing service: see 
'Writing R Extensions' and the R-admin manual.  You don't need to ask 
others to do this for you.