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 FilesMicrosoft Visual Studio .NET 2003Common7ToolsBin to be exact) and then copied it to

C:program filesMicrosoft Visual Studio .NET 2003Vc7bin

and

C:program filesMicrosoft Visual Studio .NET 2003SDKv1.1Bin

and then my solution finally compiled. :)

Advertisements

One thought on “Visual C++ fatal error LNK1158 midl.exe”

  1. 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

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s