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 GCC - Android, Linux
We’re plan make both Android and Linux to use Clang as well
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.
With each (biweekly) release of Defold, we release a new Defold SDK. With it, we ship the libraries of the engine, and also a build manifest file, which is identical in structure and syntax as the extension and app manifests.
(This sdk is not yet public)