When I open it on my machine, it runs fine, but when I open the file on another mac, it says:
dyld: Library not loaded: @rpath/libui.A.dylib
Referenced from: /Users/computername/Desktop/test
Reason: image not found
Abort trap: 6
I am using this shard (https://github.com/hedron-crystal/hedron), and it is basically a way to utilize libui (https://github.com/andlabs/libui) with crystal. I have zero experience with C and static/dynamic libraries. I always assumed when the crystal program was compiled, it also compiled the C library in with it. Is there any way I can get crystal to build the C library in my /usr/local/lib file in with the compiled crystal executable?
Then use crystal build --static ... to build statically linked application. After that you can copy your single binary to another Docker container with Alpine Linux but without Crystal and any mentioned libraries installed and it will work.