2

I'm migrating an old C++ project to Visual Studio 2013. The project contains an .odl file. When I try to build the project I'm getting the following errors:

Error   3   error MIDL2025: syntax error : expecting ; near "{" C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h  888 1   
Error   2   error MIDL2003: redefinition : Int64ShllMod32   C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h  888 1   
Error   1   error MIDL2003: redefinition : INT  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h  387 1   

In the .odl file are imported the following idls:

import "oaidl.idl";
import "mshtml.idl";

I've tried the workaround from the following link : http://blogs.msdn.com/b/vcblog/archive/2007/06/12/com-interface-redefinition-error.aspx but it didn't solved my problem.

I don't have any redefinition of Int64ShllMod32 or INT in my project files. Any idea what can cause these errors ? Thank you !

Madalin
  • 129
  • 15
  • The MIDL_PASS macro is not defined for some mysterious reason. [Read this](https://msdn.microsoft.com/en-us/library/windows/desktop/aa367301%28v=vs.85%29.aspx). – Hans Passant Jan 25 '16 at 12:30
  • @HansPassant I've tried that workaround and I still have the same issues. Also, I've tried with and "empty" `.idl` ( ony the import statements ) and I have the same errors. I've found out that if I change the project settings `Platform Toolset from Visual Studio 2013 (v120) to Visual Studio 2013 Windows Xp (v120_xp )` the empty project builds succesfully. – Madalin Jan 25 '16 at 14:37
  • I've tried to use Windows 10 SDK in Visual Studio 2013 ( on Windows 8.1 ) and my empty idl and odl files ( they contain only the import statements ) are building succesfully. What I'm missing ? – Madalin Jan 25 '16 at 15:26

1 Answers1

2

I had a pretty similar problem and what fixed it was changing the version of Windows SDK to a more recent one ! Hope this helps ! :)

Emile
  • 592
  • 10
  • 36