Here we list some relevant build information, in order to make the integrations with your extensions as easy as possible.
Here are some things to consider when you create an extension for the Defold engine. For more general guidelines on how to develop cross platform native code, and also extension/Lua apis, please refer to Native Extensions - Best Practices
In the engine itself we use no C++ version higher than C++98. While you may use a higher version to build your extension, bear in mind that a higher version might come with ABI changes. This might make it impossible to use your extension in conjunction with other extensions in the engine or on the asset store.
When creating libraries (such as extensions), it’s good to keep the lowest common denominator as a target.
Clang - macOS, iOS, Win32, Android GCC - Linux
We plan to use clang for Linux aswell at some point
Microsoft Visual Studio 14.0alt
For iOS/MacOS, we use
We don’t specify a specific C++ version, so we use the default of each compiler.
A recent addition is to be able to build the Windows builds using clang. This allows for faster builds on our servers, and also allows us to streamline our builds.
The custom engine is built using static linkage. The main reason is that on iOS version < 8, multiple executable binaries in an .ipa aren’t allowed in the app store.
We don’t make use of any exceptions in the engine. It isn’t generally used in game engines, since the data is (mostly) known beforehand, during development. Removing the support for C++ exceptions decreases executable size and improves the runtime performance.