The basic binary format is different on each platform, so if you are not using a virtual machine (such as Java or Flash), you will have to recompile your program on each platform.
Some compilers (for example, GCC) allow cross-compilation, but it is not trivial to configure it. Probably the easiest cross-compilation system is Linux (there are several open source projects that have cross-compilation configured from Linux to Windows).
In the case of a GUI application, it depends on the language - if you are stuck with C ++, Qt or wxWindows can be a smart choice providing a level of abstraction over your own windows system.
If you can go with Java, it will make life easier, however the window system is Java and is not native.
Another language worth considering is FreePascal w / Lazarus - it has a pretty good graphic designer that compiles to its own windows system on each platform (WinAPI on Windows, Cocoa on OSX and GTK on Linux).
source share