I’ve been working through my first full project with Defold, and really loving the productivity and performance.
Native extensions keep tripping me up, unfortunately. I’ve been trying to get an advertising extension to work alongside GPGS (which I’ve fully integrated and worked great). def_ironsource caused crashes on startup, and now DefVideoAds is failing to bundle for Android (“resource cannot be null”).
Yes, the log shows that extension-gpgs and DefVideoAds (ping @AGulev) shares some utility functions with the same names. They are declared twice. I’ve fixed this in extension-gpgs (merged into main extension and made them static) and released a new version: Release Google Play Game Services 1.2.4 · defold/extension-gpgs · GitHub
Thanks for the quick fix! Will give your update a try soon. I’d already copied the video ads extension locally and renamed those utilities to get around the error.
I’m looking forward to learning more about how the native extensions work, actually.
Is there a TL;DR version of why extensions can have conflicts like this? I’ve never done any C++ in my career, mostly C#, Java, and Javascript.
It is not really a mystery. Both extensions declared a function with the same name and didn’t scope the declaration to the extension itself. When the two extensions are built the linker detects that the symbol (function) is declared twice and throws an error. Basically the same problem as in any other programming language.