[R] Failure to execute R CMD SHLIB successfully

Jeroen Ooms jeroen.ooms at stat.ucla.edu
Thu Feb 5 03:21:41 CET 2015


On Sat, Jan 31, 2015 at 1:36 PM, Fisher Dennis <fisher at plessthan.com> wrote:

> followed by a series of errors:
> > gcc -m32 -shared -s -static-libgcc -o ../compiled/Windows32.so tmp.def
> ConvertSAS.o CKHashTable.o readstat_convert.o readstat_bits.o readstat_io.o
> readstat_sas.o -Ld:/RCompile/CRANpkg/extralibs64/local/lib/i386
> -Ld:/RCompile/CRANpkg/extralibs64/local/lib
> -LC:/PROGRA~1/R/R-31~1.2/bin/i386 -lR
> > readstat_convert.o:readstat_convert.c:(.text+0x42): undefined reference
> to `_imp__libiconv'
> > readstat_sas.o:readstat_sas.c:(.text+0x10b5): undefined reference to
> `_imp__libiconv_close'
> > readstat_sas.o:readstat_sas.c:(.text+0x1126): undefined reference to
> `_imp__libiconv_open'
> > readstat_sas.o:readstat_sas.c:(.text+0x1808): undefined reference to
> `dprintf'
> > readstat_sas.o:readstat_sas.c:(.text+0x1da1): undefined reference to
> `_imp__libiconv_open'
> > readstat_sas.o:readstat_sas.c:(.text+0x1de4): undefined reference to
> `_imp__libiconv_close'
> > collect2: ld returned 1 exit status
>


The windows build of R includes a special version of iconv (Riconv.dll in
the same dir as R.exe). Therefore if you include iconv.h somewhere, you
also need to link to Riconv.dll in your Makevars.win:

PKG_LIBS= -lRiconv

	[[alternative HTML version deleted]]



More information about the R-help mailing list