Some people use non-standard libraries that are available on multiple platforms - such as SDL
. As long as you don't write any system-specific code, you should theoretically be able to copy and paste your code without any changes.
SDL is specifically designed for use with the platform's API's for making games and other interfaces, so it may or may not have everything you need. But there are other multi-platform libraries. And I don't see why you couldn't use multiple libraries anyway.