Simple/stupid (?) problem with Windows/ rstan suddenly not finding dll properly

Stupid question, which I am embarrassed to be posting, but I have been unable to solve so far.

I am running R 4.0.0 under Windows, and when I call library(rstan) I get an error message along the lines of (some of the original is in German):

Error: package or namespace load failed for ‘rstan’ in inDL(x, as.logical(local), as.logical(now), …):
[cannot load] shared object ‘C:/RWindows/R-4.0.0/library/rstan/libs/x64/rstan.dll’:
LoadLibrary failure: The specified procedure could not be found.

Note I also have R4.1 installed in another place, but am not able to use that, for complex reasons.

All help appreciated.

thanks,

Sean Matthews

Can you restart R and try reinstalling rstan and stanheaders from source? You might get a bunch of compiler warnings while its installing but they’re safe to ignore

magic, thanks. I knew it was a stupid question.