Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

#import does not work after compiler update

Przemysław_O_
Beginner
1,195 Views

Hello,

after update of Intel C++ compiler and Visual Studio, the #import statement does not work anymore and causes INTERNAL COMPILER ERROR.

Repro:

C++ Console Application Project with:

// ImportCOM.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"

#import "LicProtector500.dll"

int main()
{
    return 0;
}

produces as output:

1>------ Rebuild All started: Project: ImportCOM, Configuration: Debug Win32 ------
1>stdafx.cpp
1>ImportCOM.cpp
1>59242.cpp
1>c:\program files (x86)\microsoft visual studio\2017\enterprise\vc\tools\msvc\14.15.26726\include\comdef.h: : error C1001: An internal error has occurred in the compiler.
1>(compiler file 'msc1.cpp', line 1518)
1>Internal Compiler Error in C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.15.26726\bin\HostX64\x86\cl.exe.  You will be prompted to send an error report to Microsoft later.
1> To work around this problem, try simplifying or changing the program near the locations listed above.
1>Please choose the Technical Support command on the Visual C++
1>INTERNAL COMPILER ERROR in 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.15.26726\bin\HostX64\x86\cl.exe'
1> Help menu, or open the Technical Support help file for more information
1>    Please choose the Technical Support command on the Visual C++
1>    Help menu, or open the Technical Support help file for more information
1>Done building project "ImportCOM.vcxproj" -- FAILED.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

Error on VC 15.8.8 & Intel C++ 2018.5.274

Under VC 15.7.6 & Intel C++ 2018.3.210 works fine.

0 Kudos
8 Replies
Viet_H_Intel
Moderator
1,195 Views

The VC 15.8.8 just released about a week ago, after Intel Compiler Update 4 released. 

Can you verify if the problem still occurs on older VS version (15.7.6)?

I will try to find a system with the same setup to reproduce.

 

Thanks,

Viet 

0 Kudos
Przemysław_O_
Beginner
1,195 Views

It works fine with 15.7.4.

0 Kudos
Przemysław_O_
Beginner
1,195 Views

I have tested this issue with VC 15.9.1 and the problem with import still exists.

Intel® Parallel Studio XE 2018 Update 5 Composer Edition for C++ Windows* Integration for Microsoft* Visual Studio* 2017, Version 18.0.31.15

1>------ Rebuild All started: Project: ImportCOM, Configuration: Debug Win32 ------
1>stdafx.cpp
1>ImportCOM.cpp
1>40842.cpp
1>c:\program files (x86)\microsoft visual studio\2017\enterprise\vc\tools\msvc\14.16.27023\include\comdef.h: : error C1001: An internal error has occurred in the compiler.
1>(compiler file 'msc1.cpp', line 1518)
1> To work around this problem, try simplifying or changing the program near the locations listed above.
1>Please choose the Technical Support command on the Visual C++
1> Help menu, or open the Technical Support help file for more information
1>Internal Compiler Error in C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\bin\HostX64\x86\cl.exe.  You will be prompted to send an error report to Microsoft later.
1>INTERNAL COMPILER ERROR in 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\bin\HostX64\x86\cl.exe'
1>    Please choose the Technical Support command on the Visual C++
1>    Help menu, or open the Technical Support help file for more information
1>Done building project "ImportCOM.vcxproj" -- FAILED.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

Have you send an error report to Microsoft?

Is there any workaround?

0 Kudos
AndrewC
New Contributor III
1,195 Views

I am all for continuous delivery but Microsoft just keeps breaking things release after release. They are up to 15.9.2 now.

0 Kudos
Przemysław_O_
Beginner
1,195 Views

This error occur also with:

Intel® Parallel Studio XE 2019 Update 1 Composer Edition for C++ Windows* Integration for Microsoft* Visual Studio* 2017, Version 19.0.6.15

1>------ Rebuild All started: Project: ImportCOM, Configuration: Debug Win32 ------
1>stdafx.cpp
1>ImportCOM.cpp
1>89842.cpp
1>Internal Compiler Error in C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\bin\HostX64\x86\cl.exe.  You will be prompted to send an error report to Microsoft later.
1>INTERNAL COMPILER ERROR in 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\bin\HostX64\x86\cl.exe'
1>    Please choose the Technical Support command on the Visual C++
1>    Help menu, or open the Technical Support help file for more information
1>c:\program files (x86)\microsoft visual studio\2017\enterprise\vc\tools\msvc\14.16.27023\include\comdef.h: : error C1001: An internal error has occurred in the compiler.
1>(compiler file 'msc1.cpp', line 1518)
1> To work around this problem, try simplifying or changing the program near the locations listed above.
1>Please choose the Technical Support command on the Visual C++
1> Help menu, or open the Technical Support help file for more information
1>Done building project "ImportCOM.vcxproj" -- FAILED.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

 

0 Kudos
JenniferJ
Moderator
1,195 Views

It's likely a change in the VS. We don't compile "import" but rely on VC to do. It's probably an issue in the integration between ICL and MSVC with newer MSVC. 

is the code built ok with VC?

How about try the workaround: 

  • build with VS to get the .tlb, and import it. 

I'll do a quick test as well.

Jennifer 

0 Kudos
JenniferJ
Moderator
1,195 Views

Starting from scratching on creating a dll project and a console project, it works fine using VS2017 and ICL 19.0.1 (update 1). 

But using the LicProtector500.dll, icl gaves an error. 

Is LicProtector500.dll created from an older VS? 

Jennifer 

0 Kudos
Przemysław_O_
Beginner
1,195 Views

Hello,

I have tested it already with VC 15.8.x and 15.9.x combined with Intel 2018.x and 2019.x and always become that internal compiler error.

VC without Intel works fine.

LicProtector is 3rd party library (https://www.mirage-systems.de/en/). I suppose it was created with an older version of VC, but I use it as COM object.

Thanks

Przemek

0 Kudos
Reply