Portability to as many systems as possible is one of the primary design goals of ScummVM. We strive all the time to ensure our code compiles and runs on as many systems as possible. To this end, it's important that our developers are aware of certain typical portability problems and pitfalls. On this page we try to collect some of them.
Work in progress : This page is incomplete. We should probably also link on some good & relevant web pages on the net, and only focus on the most frequent or maybe unusual (ScummVM specific) issues.
== Language features ==
ScummVM is written in a subset of C++. Due to limitations of the C++ run-times on various platforms, the following features cannot be used:
* C++ exceptions (throw/catch): Not all C++ compilers support these correctly (esp. on embedded systems), and exception support incurs a noticeable overhead in binary size.
* C++ RTTI (run-time type information, as in dynamic_cast<>): This incurs a severe overhead in binary size and memory usage, as every C++ object is enlarged by RTTI information
== File access ==
In a nutshell, you must not use fopen(), fread(), fwrite(), etc., nor open(), close(), etc. in your code (unless you are developing a backend, that is). Instead you must use the APIs for reading and writing files provided by ScummVM. Please consult the [[HOWTO-Open Files|HOWTO Open Files]] page for details.