libethc icon indicating copy to clipboard operation
libethc copied to clipboard

build: cross compiling with debian

Open bonze82 opened this issue 6 months ago • 3 comments

Used this as my reference https://github.com/mhw0/libethc/issues/43#issue-2331697703 the libraries build fine but the end code gives me error: format ‘%s’ expects argument of type ‘char ’, but argument 2 has type ‘char ()[40]’ [-Werror=format=] So removed the [40] and I get undefined reference to `eth_hex_to_bytes' with 2 other undefined errors.

Any ideas? I'm usually pretty good at figuring these things out but normally don't use libraries.

bonze82 avatar Jul 22 '25 00:07 bonze82

gcc compile: gcc -Wall -Wextra -Wpedantic -Werror -Wno-sign-compare -save-temps -lethc account\ create.c

bonze82 avatar Jul 22 '25 00:07 bonze82

Hello @bonze82 Thanks for opening this issue.

My primary machine is macOS and couldn't build and test on other systems and actually planning adding cross compiling to CI so people can build and use this library on most known systems. But, this will be landed in v2, so I'm afraid you will have to wait a bit

mhw0 avatar Jul 22 '25 04:07 mhw0

Got it to cross compile to debian, you have to instruct the compiler to use libraries and headers -llibetc -L/usr/local/libethc -I/usr/local/lib/include

I'm now off to make this project work. Can you change the title to cross compiling with debian for others that may need this info.

bonze82 avatar Jul 26 '25 21:07 bonze82