I’m currently working on a plugin for OpenFL for the Upsight/Kontagent analytics framework, for our upcoming iOS port of Try Harder.
The plugin itself is building, but when I try to build a project that include it, I’m getting the following:
Undefined symbols for architecture armv7:
"_openflkontagent_register_prims", referenced from:
_main in Main.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any ideas?
All the code is drawn from already existing (And working) extensions.
using this to build (from inside the extension folder)
lime rebuild ./project ios -clean
outputs no errors
I also noticedd that the error I showed in the original post also happens for 64 a bit higher up in the output
Undefined symbols for architecture arm64:
"_openflkontagent_register_prims", referenced from:
_main in Main.o
(and yes, we’re definitely planning to contribute these extensions once it makes sense at the end oft his project we’ll have built several for marketing & analytics frameworks that we’re implementing for a client, and I don’t see any reason why anybody should ever go through this again if we already have )
I realized that if I open the exported Xcode project, the Other Linker Flags are
-lstd -lregexp -llime -lstd -lregexp -llime -lstd -lregexp -llime -lgamecenter -lopenflunityads -lopenflupsight -lApplicationMain -stdlib=libc++ -all_load
I’ve added -lopenflkontagent to it, and then I get a bit further.
Undefined symbols for architecture i386:
“OBJC_CLASS$_Kontagent”, referenced from:
objc-class-ref in libopenflkontagent.a(7c9cd8f0_OpenFLKontagent.o)
I have several .a files that are referenced in the extension. I tried to put them in the Build.XML
like this:
<lib name="/lib/libKontagent.a" />
But that generates the error above (after manually adding -lopenflkontagent to the linker flags.
So to continue, my question is now twofold:
how do I get -lopenflkontagent to automatically be put into the other linker flags?
how do I properly include .a libraries into an extension?