Some DNS API functions cause LNK2019 errors in x86 (32 bit) builds
Davide Beatrici
1
Reputation point
Some DNS API functions (such as DnsServiceConstructInstance()
, DnsServiceFreeInstance()
, DnsServiceRegister()
, DnsServiceDeRegister()
and DnsServiceRegisterCancel()
) are declared without the WINAPI
modifier, causing them to use __cdecl
instead of __stdcall
.
Forcing the use of __stdcall
(/Gz MSVC option) allows to work around the issue.
Thanks to Russ Keldorph for investigating the issue: https://developercommunity.visualstudio.com/content/problem/1191345/some-dns-api-functions-cause-lnk2019-errors-in-32.html
Sign in to answer