For the benefit of others running into this: Thanks to a poster on NVidia CUDA developers forum, I was able to solve the mysterious link error. The cause of the link error is the usage of “long” type which happens to be taken to be 32-bit long on Windows 64 bit machines while it is taken to be 64 bit long on Linux 64 bit machines. Replacing all occurrences of “long” in the code by “int64_t” got rid of the link error. As mentioned by that knowledgeable poster on the CUDA forum, it is a really bad idea to use “long” in code that is meant to be cross-platform.