0

I am trying to use IdnToAscii in my code. Accourding to msdn

http://msdn.microsoft.com/en-us/library/windows/desktop/dd318149(v=vs.85).aspx

all I need is kernel32.dll. But I receive linking error when trying to build:

Error 1 error LNK2019: unresolved external symbol __imp__IdnToAscii@20 referenced in function _wmain.

Including normaliz.lib to project solves the issue.

The question is why do I have to include it. Is it a mismatch in msdn documentation or I am missing something.

Thanks

1 Answers1

1

Please check the 'Requirements' paragraph of the MSDN: https://msdn.microsoft.com/en-us/library/windows/desktop/dd318149%28v=vs.85%29.aspx

There you can see that the IdnToAscii method is in the Normaliz.dll (not kernel32.dll)and to use this method you have to includes Normaliz.lib.

Dmytro Khmara
  • 1,200
  • 1
  • 8
  • 12
  • I assume msdn guys added this dependency recently. As you can see I commented under the post you mentioned. So at the Time I was writing that comment the kernel32 was mentioned as requirement. Anyway Thanks for your response. – HARUT HARUT Oct 21 '15 at 14:53