Visual C++ fatal error LNK1158 midl.exe
ok. Dang it I don’t like C++ and I was getting this error trying to compile a solution. Since searching in google doesnt give anything (do c++ developers use the internet yet?) I am posting this here for the next unlucky soul. What it means is that file is missing from an executable path or include path. What I did to fix was find midl.exe in another directory (C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools\Bin to be exact) and then copied it to
C:\program files\Microsoft Visual Studio .NET 2003\Vc7\bin
and
C:\program files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin
and then my solution finally compiled. :)
Simlar Posts

June 8th, 2006 at 2:11 pm
Hi,
the problem with midl.exe is that some installation programs extend the environment variable PATH in an improper way. If it happens again, or someone else has this problem, I recommend checking the PATH environment and fix all spurious entries. It should work then as expected. I had this problem several times, and right now I fixed it by removing a path entry having quotes (a DirectX SDK gift ;-).
all the best