Hello,
Created a 64 bit Ubuntu vm and confirmed the bug.
Steps to fix
1. In main.cc, remove the extern before the R_running_as_main ...
2. Remove the include "RInterfaces.h" from ream.h and move it to main.cc
Removing the extern might make it backwards incompatible with R < 3.2.
That can be easily fixed with some conditional includes. That said, can you check if it works with say R 3.0?
I have attached a patch file.
Please confirm it works ...
Cheers
Saptarshi