On 2 separate machines in completely different environments (work, home) I've been unable to compile libCURL out of the box. Running nmake -f Makefile.vc mode=dll VC=10, I get an unresolved external symbol errors for _IdnToAscii and _IdnToUnicode. I believe the definitions are in Normaliz.lib, which is referenced in LFLAGS, but it either isn't finding it or the version I have doesn't have those functions. But I don't see any option to download this file...anyone have a good solution short of commenting out the 2 lines that use these functions?
1 Answers
It looks like you don't have the IDN API from Windows. According to the Windows documentation: http://msdn.microsoft.com/en-us/library/windows/desktop/dd318151%28v=vs.85%29.aspx
And to the libcurl building instructions: https://github.com/bagder/curl/blob/master/winbuild/BUILD.WINDOWS.txt
IDN API is available from Vista and later and can be installed from: http://www.microsoft.com/downloads/details.aspx?FamilyID=AD6158D7-DDBA-416A-9109-07607425A815
You can either build it on Vista or install the package from Microsoft or forgo IDN. To build without IDN just pass ENABLE_IDN=no to the nmake.
NB: It's important to delete the assorted build directories prior ro rerunning nmake with different parameters as some library references may be already in the generated object code.

- 493
- 2
- 6
-
Running the command with USE_IDN=no didn't work initially, but after deleting the assorted build directories, it worked fine. This was presumably why I am asking this question, as I've tried this before, but didn't think to do a full rebuild. The IDN install did not fix the problem out of the box, but I can use libcurl without it so it's not overly important. – Rollie Oct 15 '12 at 02:10
-
Windows 7, issue exists in both enterprise and home version – Rollie Oct 15 '12 at 18:01
-
Then you should have the library by default. The issue is probably due to some customization of directories in VC settings. But it's hard to say for sure. Try searching for Normaliz.lib in all your PC and determin whether it is in the default library search paths. – Rostislav Kondratenko Oct 15 '12 at 18:05
-
I've done that before; wouldn't nmake simply fail if attempting to include a library that it can't find? Re the customization of directories, I tried this build on a brand new laptop with a fresh vc2010 install - I don't believe I changed anything prior to building libcurl. – Rollie Oct 15 '12 at 18:14
-
That's looking strange. I'll try to build it on my Win 7 tomorrow and detect the problem. Nmake will fail on building with it. Nmake itself doesn't search for libraries. Linker do. – Rostislav Kondratenko Oct 15 '12 at 18:22
-
Here: http://stackoverflow.com/questions/7060051/linking-against-winnls using SDK 7 is advised for the same problem. Also please check whether you have the library for the architecture you are building for (32 or 64 bit). – Rostislav Kondratenko Oct 16 '12 at 08:07