First, why must many languages have their programs compiled with a specific OS in mind? I understand how hardware differences could require something like this, but not how a pure software difference could do so.
Second, are there any cross-platform languages that are NOT scripting languages (ECMAScript, PHP, etc.)?