link error when build mDNSWindows using VS2019, any ideas?

unresolved external symbol _mdns_malloc@4 referenced in function _syslog dnssd \mDNSResponder-2200.80.16\mDNSWindows\DLL\dnssd_clientstub.obj

unresolved external symbol _mdns_free@4 referenced in function _syslog dnssd \mDNSResponder-2200.80.16\mDNSWindows\DLL\dnssd_clientstub.obj

Answered by DTS Engineer in 781810022

The core mDNS code is highly portable, so it talks to system services via a a series of abstractions. One of those services is the memory allocator. The portable code calls mdns_malloc, mdns_free, and so on. Typically these get mapped to malloc, free, and so on via series of #define macros. For some reason this isn’t happening in your build system.

I’m not familiar with Windows build environments, so I’ve no idea why that’s the case. You’ll have to look at the code to find the #define macros and then look at your build system to determine why that’s not happening there.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Accepted Answer

The core mDNS code is highly portable, so it talks to system services via a a series of abstractions. One of those services is the memory allocator. The portable code calls mdns_malloc, mdns_free, and so on. Typically these get mapped to malloc, free, and so on via series of #define macros. For some reason this isn’t happening in your build system.

I’m not familiar with Windows build environments, so I’ve no idea why that’s the case. You’ll have to look at the code to find the #define macros and then look at your build system to determine why that’s not happening there.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

link error when build mDNSWindows using VS2019, any ideas?
 
 
Q