1

I already installed Rtools35. But aftering install Rtools35, It continually occurs error in Rstudio.

This error is as follow :

extension<-ifelse(isWindows, ".dll", ".so") 
dyn.load(paste0("D:/Platanus/CiPA_Rocde/CiPA-master/AP_simulation/models/newordherg_qNet",extension)) 

Error in inDL(x, as.logical(local), as.logical(now), ...) :
unable to load shared object 'D:/Platanus/CiPA_Rocde/CiPA-master/AP_simulation/models/newordherg_qNet.dll' 
LoadLibrary failure: The specified module could not be found.

To solve above error, I need to check dubious things.

[1. Rtool version issue] May be..... Does it occur error because of Rtool version?

I'm using R 3.6.3 version and Rtool35 version based on window10.

Do you know which Rtools version should be installed for R 3.6.3 in windows10(64bit)?

Can I install Rtools35? or Can I install Rtools40?

[1. Issue solution] I checked @r2evans opinion mentioned as below, So I'll continually use Rtool35.

[2. R CMD SHLIB compile error in powershell in window10 issue] To get .dll file, I compiled newordherg_qNet.c in powershell in window10. Aftering compiling, It occurs error as following.

-Run error example

PS D:\Platanus\CiPA_Rocde\CiPA-master\AP_simulation\models> R CMD SHLIB newordherg_qNet.c
Invoke-History : 'SHLIB' It couldn't find location parameter permitting factor.  
Location line : 1 character : 1
+ R CMD SHLIB newordherg_qNet.c
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : InvalidArgument: (:) [Invoke-History], 
ParameterBindingException
+ FullyQualifiedErrorId : 

PositionalParameterNotFound,Microsoft.PowerShell.Commands.InvokeHistoryCommand


Although I find solution associated with R CMD SHLIB issue, It is difficult to solve the issue. Do you have any idea to solve error?

  • 1
    Does the file exist? (Is `file.exists('D:/kyuri_kim/CiPA_Rocde/CiPA-master/AP_simulation/models/newordherg_qNet.dll')` true?) (Is there a reason you deleted the [previous version of this question](https://stackoverflow.com/q/61093566) and asked almost verbatim the same today? Not an issue, just curious.) – r2evans Apr 09 '20 at 02:10
  • @r2evans : 1. It doesn't exist this file - 'D:/kyuri_kim/CiPA_Rocde/CiPA-master/AP_simulation/models/newordherg_qNet.dll' in corresponding folder. Only, It does extist this file- D:/kyuri_kim/CiPA_Rocde/CiPA-master/AP_simulation/models/newordherg_qNet.c' in my PC. 2. Reason deleting previous problem is because I wanted to rewrite my problem. –  Apr 09 '20 at 04:23
  • Okay, well, the code in your question is trying to load a file that does not exist, and the error is telling you that the file could not be found. You need to find out how to compile the `newordherg_qNet.c` into a `.dll`. Just trying to load a `.dll` file is not sufficient for the system to know how to create it. If there is a `Makefile` in the same directory, that might be a good start to figure out your compilation steps required. – r2evans Apr 09 '20 at 04:54
  • And btw, to answer the question in your title: the Rtools page [Building R for Windows](https://cloud.r-project.org/bin/windows/Rtools/) says that versions 3.5 and 3.4 are appropriate for your R-3.6.3 (I'd go with 3.5, but ymmv). I think you should not try installing Rtools-4.0, as it says that it is for *"Special R-testing build of R 4.0 only"* (meaning Rtools-4.0 might be set up primarily/solely for R-4.0 ... which, according to the main [R Project](https://www.r-project.org/) page, should be later this month). – r2evans Apr 09 '20 at 06:26
  • @r2evans I checked opinion that you mentioned above. While running programming, There are some errors. Can you check another error code above? –  Apr 10 '20 at 06:25
  • I have no idea, it could be many things. Perhaps you can copy the `.dll` from the same person who have you the `.c` file? – r2evans Apr 10 '20 at 13:56

0 Answers0