Error in compileCode

Sorry for the late reply.

I solved this based on this thread:

The problem was that Rtools had installed both 32-bit and 64-bit versions by default. I reinstalled it just using 64-bit version and it worked!