But when I added resulted curl static library to FreeBasic 1.09 (gcc 5.2, gcc 8.1) project - compilation fails with:
Code: Select all
C:/Temp/nghttp3-0.7.0/lib/nghttp3_ringbuf.c:50: undefined reference to `__popcnt'
E:\Program Files\FreeBASIC\libPlusN3/libnghttp3.a(nghttp3_ringbuf.c.obj): In function `nghttp3_ringbuf_reserve':
C:/Temp/nghttp3-0.7.0/lib/nghttp3_ringbuf.c:130: undefined reference to `__popcnt'
E:\Program Files\FreeBASIC\libPlusN3/libngtcp2.a(ngtcp2_ringbuf.c.obj): In function `ngtcp2_ringbuf_buf_init':
C:/Temp/ngtcp2-0.8.1/lib/ngtcp2_ringbuf.c:59: undefined reference to `__popcnt'
In sources there a replacement for arm defined like this:
Code: Select all
#if defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_ARM64))
unsigned int __popcnt(unsigned int x) {
unsigned int c = 0;
for (; x; ++c) {
x &= x - 1;
}
return c;
}
#endif