You can see program dependencies with ldd.
Ensure that both machines have the same libraries required.
strace can show you which files are accessed ; ensure that the files are present at the right place.
strace program-name | grep "^open("
I can't help with the compilation errors without the exact error message.