Graf Zahl wrote:Have you read what the page says? The problem seems to be that you link to an incorrect delayimp.lib.
Yes, I read that. That's the reason that I was searching for link.exe because the page says:
make sure the linker matches delayimp.lib. If there is a mismatch, you will get a linker error reporting either ___delayLoadHelper2@8 or ___delayLoadHelper@8 as an unresolved external symbol. The former implies a new linker with an old delayimp.lib, and the latter implies an old linker with a new delayimp.lib.
That looked to me like it was indicating a mismatch between delayimp.lib and the linker. So, I tried to resolve the issue from two sides: specifically pointing CMake at various link.exe files (which I assume is the linker) and I also tried messing around with the delayimp.lib files that I could find (eg moving old ones so that they were no longer in the search paths etc), though I was less clear on how I could do much with those files.
Interestingly, I did also try pointing CMake at fmodexp_vc.lib instead of fmodex_vc.lib just to see if that would make any difference. The error messages went away and I did get an exe. I didn't bother testing it though.
Graf Zahl wrote:If you can't resolve this you may just disable delayed loading of fmodex.dll.
UNfortunately this is hardcoded in the CMake file, so search for
/DELAYLOAD:\"fmodex${X64}.dll\"
and remove all occurences of it. This option should be user settable but I need to do a bit of research to do it right.
Interesting, I don't have that in any of the files in my CMake output directory (searched inside the files using TextPad). The closest I have is:
AdditionalOptions=" /machine:X86 /debug /DELAYLOAD:fmodex.dll"
AdditionalOptions=" /machine:X86 /opt:ref /opt:icf /nodefaultlib:msvcrt /TSAWARE /DELAYLOAD:fmodex.dll"
AdditionalOptions=" /machine:X86 /opt:ref /opt:icf /nodefaultlib:msvcrt /TSAWARE /DELAYLOAD:fmodex.dll"
AdditionalOptions=" /machine:X86 /debug /opt:ref /opt:icf /nodefaultlib:msvcrt /TSAWARE /DELAYLOAD:fmodex.dll"
in zdoom.vcproj
Commenting out those lines makes loading the project fail. However, just removing the "/DELAYLOAD:fmodex.dll" does give me an exe. So that seems like it might be progress.
However, I'd still like to be compiling things without this work around if possible. I wonder if uninstalling VC2005, VC2008 and then installing the latest version (Which I guess is Visual Studio Express 2013 for Windows [edit]Nope, that requires Win8[/edit]) might be the way to go?