[ldns-users] Compiling for mingw.
dE
de.techno at gmail.com
Tue Feb 17 08:59:20 UTC 2015
Hi!
I was trying to build programs which need ldns library on mingw (cross
compiling).
The library itself does compile but the headers have some problem
error: unknown type name 'socklen_t'
ldns_status ldns_udp_send(uint8_t **result, ldns_buffer *qbin, const
struct sockaddr_storage *to, socklen_t tolen, struct timeval timeout,
size_t *answersize);
So I added #include <ws2tcpip.h> in ldns.h
However when linking --
/tmp/cci2q85W.o:ldns_resolv.c:(.text+0x55): undefined reference to
`ldns_dname_new_frm_str'
/tmp/cci2q85W.o:ldns_resolv.c:(.text+0x7e): undefined reference to
`ldns_resolver_new_frm_file'
/tmp/cci2q85W.o:ldns_resolv.c:(.text+0xaa): undefined reference to
`ldns_resolver_query'
/tmp/cci2q85W.o:ldns_resolv.c:(.text+0xba): undefined reference to
`ldns_rdf_deep_free'
/tmp/cci2q85W.o:ldns_resolv.c:(.text+0xe7): undefined reference to
`ldns_pkt_rr_list_by_type'
/tmp/cci2q85W.o:ldns_resolv.c:(.text+0xf7): undefined reference to
`ldns_rr_list2str'
/tmp/cci2q85W.o:ldns_resolv.c:(.text+0x107): undefined reference to
`ldns_rr_list_deep_free'
/tmp/cci2q85W.o:ldns_resolv.c:(.text+0x113): undefined reference to
`ldns_pkt_free'
/tmp/cci2q85W.o:ldns_resolv.c:(.text+0x11f): undefined reference to
`ldns_resolver_deep_free'
/home/de/mxe/usr/lib/gcc/i686-pc-mingw32/4.8.1/../../../../i686-pc-mingw32/bin/ld:
/tmp/cci2q85W.o: bad reloc address 0x20 in section `.eh_frame'
/home/de/mxe/usr/lib/gcc/i686-pc-mingw32/4.8.1/../../../../i686-pc-mingw32/bin/ld:
final link failed: Invalid operation
collect2: error: ld returned 1 exit status
Compiling with -lldns
More information about the ldns-users
mailing list