Simply the best answers.

My UDF compiles in Linux, but I cannot compile it in Windows. Why?

This behavior is mostly due to the fact the Visual C++ compiler is stricter with non-standard C features than the gcc compiler used in Linux. In particular, the most commonly (mis)-used extension is the presence of executable statements before all declarations. Hence while