Cross Compiling 32bit on a 64bit Machine issues


I am compiling a CUDA application and I was getting some weird behavior so I was wondering if I someone knows whats going on.
The code is not mine and is open source so i can provide a link if you want. So here it goes.

I am having issues with the execution of the app when it is cross compiled to 32 bit in a 64 bit environment.
So I have Win 7 64bit and 64 bit Toolkit and SDK and while compilation is fine, a cudaMemcpy2D call returns with unknown error.
If I compile natively on 64bit everything is fine. It seems that some minor modifications to the code are needed to be made from unsigned int to size_t but everything runs fine.

I should also say that i tested in a 32bit environment with WinXP 32bit as well as 32bit Toolkit and SDK everything is fine as well.

I read somewhere ( that there was some issues with implicit casts from a 32-bit integer to a 64-bit pointer but not sure if that is the case.

Any idea ?