HeresMyAccount: Well I found a different work-around, but thanks. I still don't understand why it wouldn't be possible though, because after all, an executable file is just a bunch of bits, so there's no reason why a file that will run on one OS can't be compiled on a different OS.
EDIT: And I didn't realize that about Pascal but that's interesting.
Just saw this thread. The answer is simple: different availability of external functions. That's not to say that there aren't things like wine or cygwin or busybox that aim to address this, though.
On the first basic note of the topic: java was the cross platform experiment that failed. Notoriously even Runescape had cross platform issues at one point, iirc. The problem is we can't have all these bells and whistles and updates and expect things to work forever or between systems. C++ is now even becomming a mess of breaking old shit. Right now i'd recommend nothing other than pure C, otherwise you'll be doing lots of rewrites and introduce security holes just trying to keep your code compile-able over the next 10 years.