libhttpserver icon indicating copy to clipboard operation
libhttpserver copied to clipboard

static link for the sample http

Open laoshaw opened this issue 4 years ago • 1 comments
trafficstars

libhttpserver by default has static enabled but I could not get it to work with the hello sample program due to the fact that, unistring and p11-kit do not provide static libraries.

pkg-config --cflags --libs --static libhttpserver.pc
g++ -O2 -static hello.cpp -lhttpserver -lmicrohttpd -lgnutls -pthread -lgmp -lunistring -lidn2 -latomic -lhogweed -lgmp -lnettle -ltasn1 -lp11-kit
/usr/bin/ld: cannot find -lunistring
/usr/bin/ld: cannot find -lp11-kit

additionally if libhttpserver can support openssl and wolfssl that would be nice, gnutls is so complicated comparing to openssl and wolfssl libraries.

laoshaw avatar Apr 16 '21 16:04 laoshaw

I'm affraid you are right. You would need static library of p11-kit, and they do not provide a static version of it, neither you can compile it staticaly yourself. https://github.com/p11-glue/p11-kit/issues/355 So you won't be able to compile the project fully-statically.

easymoney322 avatar Dec 10 '23 18:12 easymoney322