Windows SDK 6.0a: unknwn. IDL compilation Error

Source: Internet
Author: User

I don't know why. I was able to compile a good project in Visual Studio 2005. Today I suddenly encountered the following problems:

 
Error 1 error midl2025: syntax error: expecting] or, near "annotation" C: \ Program Files \ microsoft sdks \ windows \ v6.0a \ include \ unknwn. IDL 108 Error 2 error midl2026: cannot recover from earlier syntax errors; aborting compilation c: \ Program Files \ microsoft sdks \ windows \ v6.0a \ include \ unwn. IDL 108

This is a problem related to the midl compiler. This problem occurs when you use the midl compiler of the old version for the new version of the Windows SDK header file.

The solution is to add your new version of midl compiler to the inclusion directory of Visual Studio. Midl error: 'annotation', blog of Microsoft Mike Wasson, has a detailed explanation. The content is summarized as follows:

A colleage recently got this error while compiling unknown. IDL: 1> C: \ Program Files \ microsoft sdks \ windows \ v6.0 \ include \ unknwn. IDL (108): Error midl2025: syntax error: expecting] or, near "annotation" 1> C: \ Program Files \ microsoft sdks \ windows \ v6.0 \ include \ unknwn. IDL (108): Error midl2026: cannot recover from earlier syntax errors; aborting compilation if you get this error, you are using a new version of the Windows headers with an older version of The midl compiler. fix: 1. make sure you installed the midl compiler when you installed the latest Windows SDK. it shoshould appear under "Program Files \ microsoft sdks \ windows \ v6.0 \ bin ". note: To install the midl compiler, You need to select Developer Tools/Windows development tools/Win32 development tools in the Windows SDK setup wizard. (at least, as of rc1.) 2. in Visual Studio, under tools> Options> projects and solutions> VC ++ directories> executable files, add X: \ Program Files \ microsoft sdks \ windows \ v6.0 \ bin to the top of the list.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.