[R] Problem with making dll under Windows

Albrecht, Dr. Stefan (APEP) stefan.albrecht at apep.com
Fri Aug 3 18:38:50 CEST 2007


Dear all,

Now everything is fine. Thanks a lot for your responses.

After the first attempts did not work, I moved some perl files into the 
C:\Programme\R\R-2.5.1\share\perl
folder. 

However, also this did not help either. 


Finally, after you emails, I (re)installed R, Rtools and Perl (and removed cygwin and DevC++ before) and so the R CMD SHLIB is now working.

I am not fully aware, what was exactly going wrong, but I guess the PATH names did make some trouble, but this might not have been the only reason.

Best regards,
Stefan Albrecht

____________________________________
Dr. Stefan Albrecht, CFA
Allianz Private Equity Partners GmbH
Königinstr. 19 | 80539 Munich | Germany

Phone: +49.(0)89.3800.18317
Fax: +49.(0)89.3800.818317
EMail: stefan.albrecht at allianz.com
Web: www.apep.com


Allianz Private Equity Partners GmbH | Geschäftsführung: Wan Ching Ang, Karl Ralf Jung
Sitz der Gesellschaft: München | Registergericht: München HRB 126221 | Ust-ID-Nr.: DE 813 264 786

-----Ursprüngliche Nachricht-----
Von: Uwe Ligges [mailto:ligges at statistik.uni-dortmund.de] 
Gesendet: Friday, August 03, 2007 15:10
An: Albrecht, Dr. Stefan (APEP)
Cc: r-help at stat.math.ethz.ch
Betreff: Re: [R] Problem with making dll under Windows

Please check that you have installed a suitable environment (tools, 
compiler etc.) as mentioned in the R Installation and Administration 
manual. Öooks like your version of Perl is corrupted.

I got with your C program:

d:\aaa>R CMD SHLIB dmypow.c
making dmypow.d from dmypow.c
gcc   -It:/R/include  -Wall -O3 -std=gnu99   -c dmypow.c -o dmypow.o
windres -I t:/R/include  -i dmypow_res.rc -o dmypow_res.o
gcc  -shared -s  -o dmypow.dll dmypow.def dmypow.o dmypow_res.o 
-Lt:/R/bin    -lR


Uwe Ligges



Albrecht, Dr. Stefan (APEP) wrote:
> Dear all,
>  
> I have problems to compile a DLL for Windows XP with R version 2.5.1 (2007-06-27).
> See output below:
>  
> C:\AZ_DATEN\C, C++\BE_speedup>R CMD SHLIB dmypow.c
> Goto undefined subroutine &DynaLoader::bootstrap_inherit at C:\Programme\R\R-2.5
> .1\share\perl/XSLoader.pm line 80.
> Compilation failed in require at c:/Programme/Perl/lib/IO/Handle.pm line 262.
> BEGIN failed--compilation aborted at c:/Programme/Perl/lib/IO/Handle.pm line 262
> .
> Compilation failed in require at c:/Programme/Perl/lib/IO/Seekable.pm line 101.
> BEGIN failed--compilation aborted at c:/Programme/Perl/lib/IO/Seekable.pm line 1
> 01.
> Compilation failed in require at c:/Programme/Perl/lib/IO/File.pm line 133.
> BEGIN failed--compilation aborted at c:/Programme/Perl/lib/IO/File.pm line 133.
> Compilation failed in require at C:\Programme\R\R-2.5.1\share\perl/FileHandle.pm
>  line 6.
> Compilation failed in require at C:\Programme\R\R-2.5.1\share\perl/R/Utils.pm li
> ne 6.
> BEGIN failed--compilation aborted at C:\Programme\R\R-2.5.1\share\perl/R/Utils.p
> m line 6.
> Compilation failed in require at C:\Programme\R\R-2.5.1/bin/SHLIB line 24.
> BEGIN failed--compilation aborted at C:\Programme\R\R-2.5.1/bin/SHLIB line 24.
>  
> The file DynaLoader.pm is in the same directory as, e.g. XSLoader.pm
>  
> The c-file itself is very simple:
> #include <Rinternals.h>
> #include <math.h>
>  
> SEXP mypow(SEXP lifeFund, SEXP bow)
> {
>  int i;
>  double n;
>  
>  n = length(lifeFund);
>  for (i=0; i<n; i++)
>   REAL(lifeFund)[i] = pow((i+1)/n,REAL(bow)[0]);
>  return(lifeFund);
> }
> 
> Could anybody help, please?
>  
> With many thanks and best regards,
> Stefan
>  
> ____________________________________
> Dr. Stefan Albrecht, CFA
> Allianz Private Equity Partners GmbH
> Königinstr. 19 | 80539 Munich | Germany
> 
> Phone: +49.(0)89.3800.18317
> Fax: +49.(0)89.3800.818317
> EMail: stefan.albrecht at allianz.com <mailto:stefan.albrecht at allianz.com> 
> Web: www.apep.com <http://www.apep.com/> 
> 
> 
> Allianz Private Equity Partners GmbH | Geschäftsführung: Wan Ching Ang, Karl Ralf Jung
> Sitz der Gesellschaft: München | Registergericht: München HRB 126221 | Ust-ID-Nr.: DE 813 264 786
> 
> 
> 
> 	[[alternative HTML version deleted]]
> 
> 
> 
> ------------------------------------------------------------------------
> 
> ______________________________________________
> 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