I'm having issues with the install and initial test on an M1 Mac.
Firstly, /usr/local/lib
/usr/local/include
and /usr/local/bin
did not exist on my machine yet, so I had to create these for the install script to work.
I then got a compile error (both from gcc and clang):
main.c:8:12: error: implicit declaration of function 'sleep' is invalid in C99
[-Werror,-Wimplicit-function-declaration]
while(1) sleep(1); /* keep the app open */
This was easily fixed with
#include <unistd.h>
The next issue seems to be that the dylib provided has not been code-signed.
I compiled the example in main.c
as below:
clang main.c -L../vendor/litesync-free-mac-arm64/ -llitesync -lsqlite3
When running the resulting binary, I get the following error:
dyld: Library not loaded: /usr/local/lib/litesync/liblitesync.dylib
Referenced from: <path-to-binary>
Reason: no suitable image found. Did find:
/usr/local/lib/liblitesync.dylib: code signature in (/usr/local/lib/liblitesync.dylib) not valid for use in process using Library Validation: library load disallowed by system policy