I’m using Xamarin on Android, and I’m trying to get c# interop to correctly register the callback to zts_start in the ztlib.so shared object library.
I found the zt.i command that is being used by swig, but it fails to find two files specified.
It’s still a work in progress and will be updated heavily over the course of the next week but it does work (you may need to tweak the Makefile for your environment). Let me know if you have any questions.
Must be my lucky day. Thanks for your work on this.
Ubuntu 20.04
On > make all
I kept getting
error: ‘uint32_t’ does not name a type; did you mean ‘u_int32_t’.
That cleared up when I did a pull. THANK YOU.
Now it’s saying,
/usr/bin/ld: lib/libzt.a(Controls.cpp.o): in function zts_start': Controls.cpp:(.text+0x2ed): undefined reference to pthread_create’
/usr/bin/ld: Controls.cpp:(.text+0x305): undefined reference to pthread_create' /usr/bin/ld: Controls.cpp:(.text+0x31c): undefined reference to pthread_setname_np’
What toolchain should I be using to build libzt. I’ve tried different combinations of clang and gcc on Mac and Linux. I can get it to build with mild code changes, but I’m thinking it should build without those.
On Mac, I get
=== BUILD TARGET zt OF PROJECT zt WITH CONFIGURATION Debug ===
Check dependencies
zt will not be code signed because its settings don’t specify a development team.
error: unable to read module map contents from ‘/users/jhammer/libzt/ports/module.modulemap’: Error Domain=NSCocoaErrorDomain Code=260 “The file “module.modulemap” couldn’t be opened because there is no such file.” UserInfo={NSFilePath=/users/jhammer/libzt/ports/module.modulemap, NSUnderlyingError=0x7fc390f34120 {Error Domain=NSPOSIXErrorDomain Code=2 “No such file or directory”}}
warning: no umbrella header found for target ‘zt’, module map will not be generated
make all really does do everything, including all the stuff you might not be equipped to build. I would suggest pulling latest and just using the make targets host_pinvoke, host_pinvoke_debug or host_pinvoke_release.
I’ve tested this on my Mac, and on Ubuntu Server 20.04 LTS running clang version 10.0.0-4ubuntu1
The 1.4.X API refresh is complete, all packages have now been updated and new documentation is out. We’ll be hosting a webinar on June 2nd where anyone is invited to ask questions or make feature requests.