collect2.exe: error: ld returned 1 exit status no DLL was created
001、windows中安装R包,需要编译,调用Rtools报错如下:
collect2.exe: error: ld returned 1 exit status
no DLL was created
ERROR: compilation failed for package 'rgdal'
。
002、编译过程报错,猜测原因可能是编译器版本问题,目前安装的Rtools是最新的版本,因此考虑降低Rtools的版本
a、首选将R版本从R.4.4降低到R.4.3
b、将Rtools的版本从R.4.4 降低到R.4.3
003、再次编译安装测试
编译、加载都没有问题。