nimble-dev / nimble

The base NIMBLE package for R
http://R-nimble.org
BSD 3-Clause "New" or "Revised" License
156 stars 23 forks source link

cannot find -lnimble_x64 collect2.exe (for compiling dynamicRegistrations_02_20_15_53_59.cpp) #1418

Closed mortamini closed 4 months ago

mortamini commented 7 months ago

When I use compileNimble() function, I face the following error

Error in inDL(x, as.logical(local), as.logical(now), ...) : unable to load shared object 'C:/Users/.../nimble_generatedCode/dynamicRegistrations_02_20_15_53_59.dll': LoadLibrary failure: The specified module could not be found.

I checked the folder and I noticed that "dynamicRegistrations_02_20_15_53_59.dll" does not exist and instead, there exists a file named "dynamicRegistrations_02_20_15_53_59.err" ! inside this file, the following error is loged:

using C++ compiler: 'G__~1.EXE (Built by Jeroen for the R-project) 8.3.0' C:/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lnimble_x64 collect2.exe: error: ld returned 1 exit status

I used the last version of Rstudio based on the last version of R x64 to install nimble and I have tried both online and offline installations using zip and source files.

I would be grateful if you kindly let me know what is the problem and its solution.

Thanks

perrydv commented 7 months ago

Hi @mortamini, Have you installed Rtools? (See Chapter 4 of our user manual at r-nimble.org.) The best place for support is the nimble-users list (see Groups & Issues at r-nimble.org). This looks like it might be an issue with your compiler setup. The Rcpp function compilerCheck can be helpful for seeing if your setup is working.