From: Matt Corallo <649246+TheBlueMatt@users.noreply.github.com> Date: Fri, 24 Sep 2021 22:56:26 +0000 (+0000) Subject: Merge pull request #43 from TheBlueMatt/main X-Git-Tag: v0.0.101.1^0 X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-c-bindings;a=commitdiff_plain;h=a830d124bb452a49e1f58809b6aeb229027fed31;hp=4ed52804d3cd73f05bba6a705528d0d43495aa88 Merge pull request #43 from TheBlueMatt/main Link libm for debug builds in testing due to new rust libstd dep --- diff --git a/genbindings.sh b/genbindings.sh index 3aa2f00..e6ffd8b 100755 --- a/genbindings.sh +++ b/genbindings.sh @@ -273,7 +273,7 @@ mv include/lightningpp_new.hpp include/lightningpp.hpp # Finally, sanity-check the generated C and C++ bindings with demo apps: # Naively run the C demo app: -gcc $LOCAL_CFLAGS -Wall -g -pthread demo.c target/debug/libldk.a -ldl +gcc $LOCAL_CFLAGS -Wall -g -pthread demo.c target/debug/libldk.a -ldl -lm ./a.out # And run the C++ demo app @@ -283,7 +283,7 @@ LD_LIBRARY_PATH=target/debug/ ./a.out > /dev/null # Finally, run the C++ demo app with our native networking library # in valgrind to test memory model correctness and lack of leaks. gcc $LOCAL_CFLAGS -fPIC -std=c99 -Wall -g -pthread -I../ldk-net ../ldk-net/ldk_net.c -c -o ldk_net.o -g++ $LOCAL_CFLAGS -std=c++11 -Wall -g -pthread -DREAL_NET -I../ldk-net ldk_net.o demo.cpp target/debug/libldk.a -ldl +g++ $LOCAL_CFLAGS -std=c++11 -Wall -g -pthread -DREAL_NET -I../ldk-net ldk_net.o demo.cpp target/debug/libldk.a -ldl -lm if [ -x "`which valgrind`" ]; then valgrind --error-exitcode=4 --memcheck:leak-check=full --show-leak-kinds=all ./a.out echo