[R] dyn.load( ) problem

2007-06-12 Thread Ian McCarthy
I am trying to access a dll with dyn.load, but I get an error message box 
titled R Console: Rgui.exe - Unable to Locate Component. The error message 
itself states this application has failed to start because libifcoremdd.dll 
was not found. Re-installing the application may fix this problem. I have 
reinstalled the program (with full installation) but still get the same error. 
I received the dll from a colleague who never had this issue on his computer, 
so I don't think it is problem with a compiler or the source code. 

Thanks in advance.

Cheers,

Ian McCarthy
Department of Economics
Indiana University
100 S. Woodlawn
Bloomington, IN 47405-7104
http://mypage.iu.edu/~imccarthhttp://mypage.iu.edu/~imccarth
[EMAIL PROTECTED]mailto:[EMAIL PROTECTED]
[[alternative HTML version deleted]]

__
R-help@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.


Re: [R] dyn.load( ) problem

2007-06-12 Thread Vladimir Eremeev


Ian McCarthy wrote:
 
 I am trying to access a dll with dyn.load, but I get an error message box
 titled R Console: Rgui.exe - Unable to Locate Component. The error
 message itself states this application has failed to start because
 libifcoremdd.dll was not found. Re-installing the application may fix this
 problem. I have reinstalled the program (with full installation) but
 still get the same error. I received the dll from a colleague who never
 had this issue on his computer, so I don't think it is problem with a
 compiler or the source code. 
 

And where is the file libifcoremdd.dll?

Looks like you have to install the Intel Fortran compiler, as this DLL is
its component (Intel-specific Fortran I/O intrinsic support library when
compiled with /MDd,
http://www.intel.com/support/performancetools/fortran/windows/sb/cs-007847.htm),
or, at least all DLLs, your DLL depends on.
Try using Dependency Walker to resolve these
(http://www.dependencywalker.com/).


-- 
View this message in context: 
http://www.nabble.com/dyn.load%28-%29-problem-tf3908956.html#a11084157
Sent from the R help mailing list archive at Nabble.com.

__
R-help@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.


Re: [R] dyn.load problem under linux

2007-02-11 Thread Domenico Vistocco
Dear All,
thanks for your help. I have misreaded the error message (I am sorry).
The message of Phil Spector solved the problem.
I think it was posted out of the list: I copy it below (it could be 
useful to someone else).

Thanks a lot,
domenico


Domenico -
   Please read the error message more carefully.  The file R claims is 
missing is libstdc++-libc6.2-2.so.3, which, in Ubuntu Edgy, is provided
by the package libstdc++2.10-glibc2.2 .  So

  sudo apt-get install libstdc++2.10-glibc2.2

should resolve the problem.
   - Phil Spector
 Statistical Computing Facility
 Department of Statistics
 UC Berkeley
 [EMAIL PROTECTED]



Prof Brian Ripley wrote:
 This is a mismatch of compiler between the machine that the code was 
 compiled on and that running the code.

 '/usr/lib/R/library/POP.R/libs/ezlic20.so':
  libstdc++-libc6.2-2.so.3: cannot open shared object file: No such file

 libstdc++-libc6.2-2.so.3 is a g++ runtime.  On my FC5 system it is 
 provided by compat-libstdc++-296-2.96-135, so I think the problem is 
 that the package was compiled on a very old version of g++.

 If this is a 'package' ask for the sources.  (People who distribute 
 compiled C++ code of general use really should compile in the runtime 
 needed, taking care to meet the licence conditions.)


 On Fri, 9 Feb 2007, Patrick Burns wrote:

 Some additional notes inserted below.

 Domenico Vistocco wrote:

 Dear HelpeRs,
 I am trying to use an thirdy-part library under Linux  (the library is
 developed
 both for Windows and for Linux).

 I have tried different solutions (with the library developer) but we 
 are
 not able to
 solve the problem. So I try to ask for your help in order to escape 
 from
 the full stop
 where we are at the moment.

 The problem looks to depend on the dyn.load function (technical details
 are below).

 Thanks a lot for your work (it is an invaluable resource).
 Best,
 domenico

 The library is called POP.R. I installed it but I have the following
 error when
 I try to load it:
 -
  

 library(POP.R)
 Error in dyn.load(x, as.logical(local), as.logical(now)) :
unable to load shared library
 '/usr/lib/R/library/POP.R/libs/ezlic20.so':
  libstdc++-libc6.2-2.so.3: cannot open shared object file: No such file
 or directory
 Error in library(POP.R) : .First.lib failed for 'POP.R'
 -
  


 Nevertheless the file exists:
 -
  

 file.exists(/usr/lib/R/library/POP.R/libs/ezlic20.so)
 [1] TRUE
 -
  


 I tried also directly using the dyn.load function on the command line
 (without and with the local flag):
 -
  

 dyn.load(/usr/lib/R/library/POP.R/libs/ezlic20.so,local=FALSE)
 Error in dyn.load(x, as.logical(local), as.logical(now)) :
unable to load shared library
 '/usr/lib/R/library/POP.R/libs/ezlic20.so':
  libstdc++-libc6.2-2.so.3: cannot open shared object file: No such file
 or directory
 dyn.load(/usr/lib/R/library/POP.R/libs/ezlic20.so,local=TRUE)
 Error in dyn.load(x, as.logical(local), as.logical(now)) :
unable to load shared library
 '/usr/lib/R/library/POP.R/libs/ezlic20.so':
  libstdc++-libc6.2-2.so.3: cannot open shared object file: No such file
 or directory



 We have seen that problems like this can arise if
 there is a mixture of 32-bit and 64-bit items.  Everything
 here is definitely 32-bit.

 -
  


 In the lib directory there is also another library, for which I have a
 different error
 message using the dyn.load function (I have the same message using
 local=FALSE):
 -
  

 dyn.load(/usr/lib/R/library/POP.R/libs/pop_BurSt.so)
 Error in dyn.load(x, as.logical(local), 

Re: [R] dyn.load problem under linux

2007-02-10 Thread Tom 'spot' Callaway
On Fri, 2007-02-09 at 21:31 +0100, Domenico Vistocco wrote:

   libstdc++-libc6.2-2.so.3: cannot open shared object file: No such file 
 or directory
 Error in library(POP.R) : .First.lib failed for 'POP.R'
 -
 
 Nevertheless the file exists:
 -
   file.exists(/usr/lib/R/library/POP.R/libs/ezlic20.so)

You're misreading the error message:

libstdc++-libc6.2-2.so.3 is the file that doesn't exist. Its a rather
ancient copy of libstdc++ from Red Hat 6.2, which almost certainly
doesn't exist in a normal Ubuntu installation. It used to be in Fedora
as part of the compat-libstdc++-296-2.96 package, but Fedora dropped it
around FC-4.

So, either, you should convince whomever compiled that library to
recompile it against a modern version of Linux (without any compat-*
libs installed), made in the last 5 years, or you could find an old copy
of the Fedora Core 4 RPM, unpack the libraries from the rpm, put them
in /usr/lib, and hope that is the only ancient library you need.

Hooray for closed source, eh?

~spot

__
R-help@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.


Re: [R] dyn.load problem under linux

2007-02-10 Thread Prof Brian Ripley
This is a mismatch of compiler between the machine that the code was 
compiled on and that running the code.

 '/usr/lib/R/library/POP.R/libs/ezlic20.so':
  libstdc++-libc6.2-2.so.3: cannot open shared object file: No such file

libstdc++-libc6.2-2.so.3 is a g++ runtime.  On my FC5 system it is 
provided by compat-libstdc++-296-2.96-135, so I think the problem is that 
the package was compiled on a very old version of g++.

If this is a 'package' ask for the sources.  (People who distribute 
compiled C++ code of general use really should compile in the runtime 
needed, taking care to meet the licence conditions.)


On Fri, 9 Feb 2007, Patrick Burns wrote:

 Some additional notes inserted below.

 Domenico Vistocco wrote:

 Dear HelpeRs,
 I am trying to use an thirdy-part library under Linux  (the library is
 developed
 both for Windows and for Linux).

 I have tried different solutions (with the library developer) but we are
 not able to
 solve the problem. So I try to ask for your help in order to escape from
 the full stop
 where we are at the moment.

 The problem looks to depend on the dyn.load function (technical details
 are below).

 Thanks a lot for your work (it is an invaluable resource).
 Best,
 domenico

 The library is called POP.R. I installed it but I have the following
 error when
 I try to load it:
 -
 library(POP.R)
 Error in dyn.load(x, as.logical(local), as.logical(now)) :
unable to load shared library
 '/usr/lib/R/library/POP.R/libs/ezlic20.so':
  libstdc++-libc6.2-2.so.3: cannot open shared object file: No such file
 or directory
 Error in library(POP.R) : .First.lib failed for 'POP.R'
 -

 Nevertheless the file exists:
 -
 file.exists(/usr/lib/R/library/POP.R/libs/ezlic20.so)
 [1] TRUE
 -

 I tried also directly using the dyn.load function on the command line
 (without and with the local flag):
 -
 dyn.load(/usr/lib/R/library/POP.R/libs/ezlic20.so,local=FALSE)
 Error in dyn.load(x, as.logical(local), as.logical(now)) :
unable to load shared library
 '/usr/lib/R/library/POP.R/libs/ezlic20.so':
  libstdc++-libc6.2-2.so.3: cannot open shared object file: No such file
 or directory
 dyn.load(/usr/lib/R/library/POP.R/libs/ezlic20.so,local=TRUE)
 Error in dyn.load(x, as.logical(local), as.logical(now)) :
unable to load shared library
 '/usr/lib/R/library/POP.R/libs/ezlic20.so':
  libstdc++-libc6.2-2.so.3: cannot open shared object file: No such file
 or directory



 We have seen that problems like this can arise if
 there is a mixture of 32-bit and 64-bit items.  Everything
 here is definitely 32-bit.

 -

 In the lib directory there is also another library, for which I have a
 different error
 message using the dyn.load function (I have the same message using
 local=FALSE):
 -
 dyn.load(/usr/lib/R/library/POP.R/libs/pop_BurSt.so)
 Error in dyn.load(x, as.logical(local), as.logical(now)) :
unable to load shared library
 '/usr/lib/R/library/POP.R/libs/pop_BurSt.so':
  /usr/lib/R/library/POP.R/libs/pop_BurSt.so: undefined symbol:
 getChainedKeyId



 This error message is actually good news -- it finds the
 file (sitting right next to the one it can't find) and gets so
 far as to find a symbol that is in the first file.  That is, this
 command appears like it would work if the first load worked.

 -

 My operating system is Ubuntu 6.10 -  Edgy.



 I'm not sure what versions of Linux other clients have
 (it's never been an issue before), but I know it works
 in Suse.

 Pat

 Follow the answers to version and sessionInfo:
 --
 version
   _
 platform   i486-pc-linux-gnu
 arch   i486
 os linux-gnu
 system i486, linux-gnu
 status
 major  2
 minor  4.1
 year   2006
 month  12
 day18
 

[R] dyn.load problem under linux

2007-02-09 Thread Domenico Vistocco
Dear HelpeRs,
I am trying to use an thirdy-part library under Linux  (the library is 
developed
both for Windows and for Linux).

I have tried different solutions (with the library developer) but we are 
not able to
solve the problem. So I try to ask for your help in order to escape from 
the full stop
where we are at the moment.

The problem looks to depend on the dyn.load function (technical details 
are below).

Thanks a lot for your work (it is an invaluable resource).
Best,
domenico

The library is called POP.R. I installed it but I have the following 
error when
I try to load it:
-
  library(POP.R)
Error in dyn.load(x, as.logical(local), as.logical(now)) :
unable to load shared library 
'/usr/lib/R/library/POP.R/libs/ezlic20.so':
  libstdc++-libc6.2-2.so.3: cannot open shared object file: No such file 
or directory
Error in library(POP.R) : .First.lib failed for 'POP.R'
-

Nevertheless the file exists:
-
  file.exists(/usr/lib/R/library/POP.R/libs/ezlic20.so)
[1] TRUE
-

I tried also directly using the dyn.load function on the command line
(without and with the local flag):
-
  dyn.load(/usr/lib/R/library/POP.R/libs/ezlic20.so,local=FALSE)
Error in dyn.load(x, as.logical(local), as.logical(now)) :
unable to load shared library 
'/usr/lib/R/library/POP.R/libs/ezlic20.so':
  libstdc++-libc6.2-2.so.3: cannot open shared object file: No such file 
or directory
  dyn.load(/usr/lib/R/library/POP.R/libs/ezlic20.so,local=TRUE)
Error in dyn.load(x, as.logical(local), as.logical(now)) :
unable to load shared library 
'/usr/lib/R/library/POP.R/libs/ezlic20.so':
  libstdc++-libc6.2-2.so.3: cannot open shared object file: No such file 
or directory
-

In the lib directory there is also another library, for which I have a 
different error
message using the dyn.load function (I have the same message using 
local=FALSE):
-
  dyn.load(/usr/lib/R/library/POP.R/libs/pop_BurSt.so)
Error in dyn.load(x, as.logical(local), as.logical(now)) :
unable to load shared library 
'/usr/lib/R/library/POP.R/libs/pop_BurSt.so':
  /usr/lib/R/library/POP.R/libs/pop_BurSt.so: undefined symbol: 
getChainedKeyId
-

My operating system is Ubuntu 6.10 -  Edgy.

Follow the answers to version and sessionInfo:
--
  version
   _  
platform   i486-pc-linux-gnu  
arch   i486   
os linux-gnu  
system i486, linux-gnu
status
major  2  
minor  4.1
year   2006   
month  12 
day18 
svn rev40228  
language   R  
version.string R version 2.4.1 (2006-12-18)

  sessionInfo()
R version 2.4.1 (2006-12-18)
i486-pc-linux-gnu

locale:
LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=en_US.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics  grDevices utils datasets  methods 
[7] base
--

Chiacchiera con i tuoi amici in tempo reale! 
 http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com

__
R-help@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.


Re: [R] dyn.load problem under linux

2007-02-09 Thread Patrick Burns
Some additional notes inserted below.

Domenico Vistocco wrote:

Dear HelpeRs,
I am trying to use an thirdy-part library under Linux  (the library is 
developed
both for Windows and for Linux).

I have tried different solutions (with the library developer) but we are 
not able to
solve the problem. So I try to ask for your help in order to escape from 
the full stop
where we are at the moment.

The problem looks to depend on the dyn.load function (technical details 
are below).

Thanks a lot for your work (it is an invaluable resource).
Best,
domenico

The library is called POP.R. I installed it but I have the following 
error when
I try to load it:
-
  library(POP.R)
Error in dyn.load(x, as.logical(local), as.logical(now)) :
unable to load shared library 
'/usr/lib/R/library/POP.R/libs/ezlic20.so':
  libstdc++-libc6.2-2.so.3: cannot open shared object file: No such file 
or directory
Error in library(POP.R) : .First.lib failed for 'POP.R'
-

Nevertheless the file exists:
-
  file.exists(/usr/lib/R/library/POP.R/libs/ezlic20.so)
[1] TRUE
-

I tried also directly using the dyn.load function on the command line
(without and with the local flag):
-
  dyn.load(/usr/lib/R/library/POP.R/libs/ezlic20.so,local=FALSE)
Error in dyn.load(x, as.logical(local), as.logical(now)) :
unable to load shared library 
'/usr/lib/R/library/POP.R/libs/ezlic20.so':
  libstdc++-libc6.2-2.so.3: cannot open shared object file: No such file 
or directory
  dyn.load(/usr/lib/R/library/POP.R/libs/ezlic20.so,local=TRUE)
Error in dyn.load(x, as.logical(local), as.logical(now)) :
unable to load shared library 
'/usr/lib/R/library/POP.R/libs/ezlic20.so':
  libstdc++-libc6.2-2.so.3: cannot open shared object file: No such file 
or directory
  


We have seen that problems like this can arise if
there is a mixture of 32-bit and 64-bit items.  Everything
here is definitely 32-bit.

-

In the lib directory there is also another library, for which I have a 
different error
message using the dyn.load function (I have the same message using 
local=FALSE):
-
  dyn.load(/usr/lib/R/library/POP.R/libs/pop_BurSt.so)
Error in dyn.load(x, as.logical(local), as.logical(now)) :
unable to load shared library 
'/usr/lib/R/library/POP.R/libs/pop_BurSt.so':
  /usr/lib/R/library/POP.R/libs/pop_BurSt.so: undefined symbol: 
getChainedKeyId
  


This error message is actually good news -- it finds the
file (sitting right next to the one it can't find) and gets so
far as to find a symbol that is in the first file.  That is, this
command appears like it would work if the first load worked.

-

My operating system is Ubuntu 6.10 -  Edgy.
  


I'm not sure what versions of Linux other clients have
(it's never been an issue before), but I know it works
in Suse.

Pat

Follow the answers to version and sessionInfo:
--
  version
   _  
platform   i486-pc-linux-gnu  
arch   i486   
os linux-gnu  
system i486, linux-gnu
status
major  2  
minor  4.1
year   2006   
month  12 
day18 
svn rev40228  
language   R  
version.string R version 2.4.1 (2006-12-18)

  sessionInfo()
R version 2.4.1 (2006-12-18)
i486-pc-linux-gnu

locale:
LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=en_US.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C

attached base packages:
[1] 

Re: [R] dyn.load problem

2004-11-14 Thread Uwe Ligges
O. Neto wrote:
Hi, Uwe.
Thank you for help.
Yesterday another R-user Mr. Ramasamy told me to do a simple program
such as (changing too the directories, now C:/minhadll/):
/*file conv.c*/
#include R.h
void printhello (){
  Rprintf(%s, hello world\n);
}
When I use C:\R\rw2000\binRCMD SHLIB -o c:/minhadll/meuteste.dll
c:/minhadll/conv.c
 to compile this one. Below is the output.
C:\R\rw2000\bin RCMD SHLIB -o c:/minhadll/meuteste.dll c:/minhadll/conv.c
making c:/minhadll/conv.d from c:/minhadll/conv.c
gcc   -IC:/R/RW2000/include -Wall -O2   -c c:/minhadll/conv.c -o
c:/minhadll/conv.o
ar cr c:/minhadll/meuteste.a c:/minhadll/conv.o
ranlib c:/minhadll/meuteste.a
gcc  --shared -s  -o c:/minhadll/meuteste.dll c:/minhadll/meuteste.def
c:/minhadll/meuteste.a  -LC:/R/RW2000/src/gnuwin32  -lg2c -lR
The result is  meuteste.dll  located in C:/minhadll/meuteste.dll. Now,
talking about paths:
I believe that I have make a correct way... but I'll list here to you:
SET PATH=C:\Rtools\;C:\Perl\bin\;C:\MinGW\bin;C:\R\rw2000\include\
I'd rather vote for
set PATH=.;C:\Rtools;C:\Perl\bin;C:\MinGW\bin;%PATH%
Anyway, this doesn't seem to be the culprit.
Do you have the recommended tools in their most recent versions?
The last point might be your OS. I think nobody of the developers is 
working on non-NT based Windows versions (such as 95, 98, ME) these days.

Uwe Ligges

Is it correct?
Thank you again for help me. I'm trying to do a dll for 3 weeks or more,
without a good result.
PS: The same error dyn.load appears
O. Neto
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] dyn.load problem

2004-11-13 Thread Uwe Ligges
O. Neto wrote:
Hi R-Users
I wrote 1 week ago asking about a message that appears when I try run
dyn.load.
   I'm trying to do an example in C code from Writing R Extension  to
learn how to do it.
I have  R 2.0.0, Rtools, Perl and MinGW as describe  in
http://www.murdoch-sutherland.com/Rtools/ with path sets.
Really, *really* sure you have followed all of readme.packages?
Works for me.
 When I use C:\R\rw2000\binRCMD SHLIB -o C:/dev-cpp/teste.dll
C:/dev-cpp/conv.c
What is the output?

a teste.dll is created without error and located in that directory, but when
I use it in RGui with Change dir set to C:/dev-cpp :
 

dyn.load(teste.dll)  results:
Error in dyn.load(x, as.logical(local), as.logical(now)) :
unable to load shared library C:/Dev-Cpp/teste:
  LoadLibrary failure:  Parâmetro incorreto. (Incorrect Parameter)
My C code is (extracted form Writing R Extension):
#include R.h
 #include Rinternals.h
 SEXP convolve2(SEXP a, SEXP b)
 {
   R_len_t i, j, na, nb, nab;
   double *xa, *xb, *xab;
   SEXP ab;
   PROTECT(a = coerceVector(a, REALSXP));
   PROTECT(b = coerceVector(b, REALSXP));
   na = length(a); nb = length(b); nab = na + nb - 1;
   PROTECT(ab = allocVector(REALSXP, nab));
   xa = REAL(a); xb = REAL(b);
   xab = REAL(ab);
   for(i = 0; i  nab; i++) xab[i] = 0.0;
   for(i = 0; i  na; i++)
 for(j = 0; j  nb; j++) xab[i + j] += xa[i] * xb[j];
   UNPROTECT(3);
   return(ab);
 }
I´m using RCMD under Windows ME.
   How can I fix this? Someone can help me ? Prof. Ripley told me to catch
more information debbuging this DLL. Is it hard to do this one under
Windows? It´s necessary modify  files SHLIB or MkDLL?
Not that easy as under Linux, at least.
Uwe Ligges
Thanks
O. Neto
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] dyn.load problem

2004-11-13 Thread O. Neto
Hi, Uwe.

Thank you for help.

Yesterday another R-user Mr. Ramasamy told me to do a simple program
such as (changing too the directories, now C:/minhadll/):

/*file conv.c*/

#include R.h
void printhello (){
  Rprintf(%s, hello world\n);
}

When I use C:\R\rw2000\binRCMD SHLIB -o c:/minhadll/meuteste.dll
c:/minhadll/conv.c
 to compile this one. Below is the output.

C:\R\rw2000\bin RCMD SHLIB -o c:/minhadll/meuteste.dll c:/minhadll/conv.c
making c:/minhadll/conv.d from c:/minhadll/conv.c
gcc   -IC:/R/RW2000/include -Wall -O2   -c c:/minhadll/conv.c -o
c:/minhadll/conv.o
ar cr c:/minhadll/meuteste.a c:/minhadll/conv.o
ranlib c:/minhadll/meuteste.a
gcc  --shared -s  -o c:/minhadll/meuteste.dll c:/minhadll/meuteste.def
c:/minhadll/meuteste.a  -LC:/R/RW2000/src/gnuwin32  -lg2c -lR

The result is  meuteste.dll  located in C:/minhadll/meuteste.dll. Now,
talking about paths:
I believe that I have make a correct way... but I'll list here to you:

SET PATH=C:\Rtools\;C:\Perl\bin\;C:\MinGW\bin;C:\R\rw2000\include\
Is it correct?
Thank you again for help me. I'm trying to do a dll for 3 weeks or more,
without a good result.

PS: The same error dyn.load appears


O. Neto

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] dyn.load problem

2004-11-12 Thread O. Neto
Hi R-Users

I wrote 1 week ago asking about a message that appears when I try run
dyn.load.
   I'm trying to do an example in C code from Writing R Extension  to
learn how to do it.
I have  R 2.0.0, Rtools, Perl and MinGW as describe  in
http://www.murdoch-sutherland.com/Rtools/ with path sets.
 When I use C:\R\rw2000\binRCMD SHLIB -o C:/dev-cpp/teste.dll
C:/dev-cpp/conv.c
a teste.dll is created without error and located in that directory, but when
I use it in RGui with Change dir set to C:/dev-cpp :

dyn.load(teste.dll)  results:
Error in dyn.load(x, as.logical(local), as.logical(now)) :
unable to load shared library C:/Dev-Cpp/teste:
  LoadLibrary failure:  Parâmetro incorreto. (Incorrect Parameter)

My C code is (extracted form Writing R Extension):

#include R.h
 #include Rinternals.h
 SEXP convolve2(SEXP a, SEXP b)
 {
   R_len_t i, j, na, nb, nab;
   double *xa, *xb, *xab;
   SEXP ab;

   PROTECT(a = coerceVector(a, REALSXP));
   PROTECT(b = coerceVector(b, REALSXP));
   na = length(a); nb = length(b); nab = na + nb - 1;
   PROTECT(ab = allocVector(REALSXP, nab));
   xa = REAL(a); xb = REAL(b);
   xab = REAL(ab);
   for(i = 0; i  nab; i++) xab[i] = 0.0;
   for(i = 0; i  na; i++)
 for(j = 0; j  nb; j++) xab[i + j] += xa[i] * xb[j];
   UNPROTECT(3);
   return(ab);
 }

I´m using RCMD under Windows ME.

   How can I fix this? Someone can help me ? Prof. Ripley told me to catch
more information debbuging this DLL. Is it hard to do this one under
Windows? It´s necessary modify  files SHLIB or MkDLL?


Thanks

O. Neto

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html