This suggests you don't have RTools40 properly installed in your system, this is a separate software that you need to install in your system in order to compile packages from source, you can download it from here
1 Like