Compilation error with #import "XXX.dll" when building the x64 configuration inside Visual Studio 2010* and Visual Studio 2012*

Reference Number: DPD200242942

Product Version: Intel C++ Composer XE 2013 for Windows update 3 only

Operating System: Windows

Problem Description:

When building your program for "x64" configuration inside Visual Studio 2010* or Visual Studio 2012 with the Intel C++ Compiler 2013 update3, you will get a compilation error if your code contains "#import <xxx.dll>" like:

#include "stdafx.h"
#include "resource.h"
#include "chello_atl_10_i.h"
#include "dllmain.h"

// ****** Following line causes Compiler Error ******
#import "C:Program FilesCommon FilesSystemadomsadox.dll"

Cchello_atl_10Module _AtlModule;

// DLL Entry Point  
extern "C" BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
    return _AtlModule.DllMain(dwReason, lpReserved);

You will get the following compiler error:

1>------ Build started: Project: chello_atl_10, Configuration: Debug x64 ------
1>Build started 4/5/2013 11:16:41 AM.
1>  ***** ClCompile (x64 - Intel C++)
1>  dllmain.cpp
1>dllmain.cpp(8): error : cannot open source file "x64\Debug\msadox.tlh"
1>    #import "C:\Program Files\Common Files\System\ado\msadox.dll"
1>                                                                 ^
1>  compilation aborted for dllmain.cpp (code 4)


This issue has been fixed and will be availabe in the next update.

Please use the workaround below for now:

  1. Open Visual Studio 2010 or 2012
  2. Select menu "Tools > Options", then select "Intel Composer XE > C++ > Compilers"
  3. Then select "x64" target platform
  4. Update "/Qlocation,link,"$(VCInstallDir)\bin\x86_amd64"" to "/Qlocation,link,"$(VCInstallDir)\bin\amd64""
  5. This is the what it looks after change:
    Options Dialog
Image icon import-issue.png21.5 KB