Removing rstan from package

My question is fairly straight forward, I have a package with a Stan model. This model is getting removed and the package no longer depends on Rstan. What files exactly needs to be removed? I removed the folders include in the inst folder: include and stan, the src folder, and stanmodels.R.
But I get the following error when I try devtools::check():

Failed with error:  'DLL 'pckg' not found: maybe not installed for this architecture?'
   *** installing help indices
   ** building package indices
   ** installing vignettes
   ** testing if installed package can be loaded from temporary location
   Error: package or namespace load failed for 'pckg' in library.dynam(lib, package, package.lib):
    DLL 'pckg' not found: maybe not installed for this architecture?

I’ve also tried running Rcmd.exe INSTALL --preclean --no-multiarch --with-keep.source pckg
What is it that I am missing?

I think you still have the useDynlib declaration in your NAMESPACE file

Thanks, I did miss that. I still get the same error, though.

Do you have a github repo or similar where I can see the code and reproduce locally?

Yes! GitHub - PhilipBerg/mavis

Your NAMESPACE file still has useDynLib, you need to remove the roxygen tag here

Ah! Thanks for helping me catch that. I just removed it manually from the namespace…
It works now!