Bram wrote: >> Build stops at: >> uninstal.obj : error LNK2001: unresolved external symbol >> _RegDeleteKeyEx >> >> I think RegDeleteKeyEx requires Vista or later, or XP x64. >> I don't need uninstal, but it breaks the build. > > I don't think this depends on the OS but on the compiler. > I'm building Vim fine on Windows XP. That is with MSVC 2010. > > We could solve this with a few #ifdefs, I suppose. But it > will mean that the binary you build with older MSVC won't > install/uninstall properly on 64 bit systems. We should > somehow give a warning about this and suggest using a newer compiler. > > For that #ifdef we need to know which compiler supports the > new function.
Hmmm. But if installing a newer compiler fixed the problem, that would simply mean that I had installed some library with RegDeleteKeyEx, so the link would be ok. However, the resulting uninstal.exe would not run on other systems without that special library. Googling for 'RegDeleteKeyEx win32' (no quotes) finds lots of hits, including: http://msdn.microsoft.com/en-us/library/ms724847%28VS.85%29.aspx http://stackoverflow.com/questions/1476749/how-do-i-delete-a-registry-entry-in-windows-x64-in-the-64-bit-tree-without-using The first seems to be the official docs, and it says that RegDeleteKeyEx requires Vista or later, or XP x64. The second is a question on exactly the uninstal.c problem: how can an executable run on Windows XP or later, including 64 bit systems, and remove certain registry entries. The ugly suggestion is to load the function dynamically, after determining the runtime environment. Perhaps you could make a macro in uninstal.c: #ifdef _WIN64 then use RegDeleteKeyEx, otherwise user RegDeleteKey. As you say, an exe built on 32 bit would run only on 32 bit. John -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
