Why it's not possible to compile on a different OS than end-user OS [closed]
- by sameold
I was trying to compile a php extension on Windows and ran into some trouble. I then thought it was possible to do the compilation for Windows on Linux, but turned out that wasn't possible.
Can someone explain to me why compiling has to be done on the same OS? I'm trying to understand this topic, specifically because if I want to distribute something, does that mean I have to compile it on all these OSs (Windows 7, Windows Vista, Windows XP, Linux, Mac, etc. etc. etc.) So what makes it not possible to compile for one OS on another? Is it the kernel or what?