[R] changes in behaviour of Rcmd SHLIB since 2.4.0
Uwe Ligges
ligges at statistik.uni-dortmund.de
Wed Mar 28 16:36:32 CEST 2007
Since R-2.4.0 less symbols are exported from R.dll.
Uwe Ligges
Jan.Kleinn at partnerre.com wrote:
> Dear all,
>
> I have some C code using the zlib uncompress. It compiles fine under Win XP
> (with SP2) with R up to 2.3.1 and generates four files (Makedeps, *.d,
> *.dll, and *.o):
>
> C:\Data\R-packages\cmg>rcmd SHLIB cmg.c -o cmg.dll
> latex: not found
> making cmg.d from cmg.c
> gcc -IC:/PROGRA~1/R/R-2.3.1/include -Wall -O2 -c cmg.c -o cmg.o
> cmg.c: In function `readcmg':
> cmg.c:33: warning: assignment from incompatible pointer type
> cmg.c:40: warning: assignment from incompatible pointer type
> cmg.c:50: warning: assignment from incompatible pointer type
> gcc -shared -s -o cmg.dll cmg.def cmg.o -LC:/PROGRA~1/R/R-2.3.1/bin
> -lR
>
> With R 2.4.0 and later, the compilation fails at the linking, so the four
> files generated are Makedeps, *.d, *.def, and *.o:
>
> C:\Data\R-packages\cmg>rcmd SHLIB cmg.c -o cmg.dll
> latex: not found
> making cmg.d from cmg.c
> gcc -IC:/PROGRA~1/R/R-2.4.1/include -Wall -O2 -std=gnu99 -c cmg.c -o
> cmg.o
> cmg.c: In function `readcmg':
> cmg.c:33: warning: assignment from incompatible pointer type
> cmg.c:40: warning: assignment from incompatible pointer type
> cmg.c:50: warning: assignment from incompatible pointer type
> gcc -shared -s -o cmg.dll cmg.def cmg.o -LC:/PROGRA~1/R/R-2.4.1/bin
> -lR
> cmg.o:cmg.c:(.text+0xc0): undefined reference to `uncompress'
> collect2: ld returned 1 exit status
> make: *** [cmg.dll] Error 1
>
> I have seen the page by Duncan Murdoch
> (http://www.murdoch-sutherland.com/Rtools/), that since 2.4.0 you need
> MinGW runtime 3.11 or higher, so I reinstalled the whole MinGW (runtime now
> 3.11, gcc core and C++ compiler now 3.4.5) and ActivePerl (now 5.8.8. build
> 820) but the problem persists.
>
> Any ideas or hints on how I could compile my C code with the current
> version of R are highly welcome.
>
> Many thanks in advance and best regards, Jan
>
>
>
> DISCLAIMER: This e-mail contains information solely intended...{{dropped}}
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list