I am trying to call a function from a library and I need a step-by-step instruction…
I am facing the following error:
in lib/libsnark/r1cs.cr:3: ‘ldflags’ link argument must be a String
I created a library that I put in lib/libsnarc.a (lib is a sub folder of the main folder having the Crystal code), but I don’t know how to tell Crystal where is my library. I tried with this @[Link(ldflags: “lib/libsnarc.a”)] that I saw on the web (https://medium.com/@cfsamson/how-to-bind-your-own-c-library-to-crystal-fec9686598b7) but it does not work.
This is how I am trying to import my library:
fun test(name : UInt8*)