Why is the code #import "a.exe" causing a compiler error C1084?

Michael Jew 0 Reputation points
2024-10-17T16:25:28.3566667+00:00

I have inherited some old code and I am trying to compile it in VS 2019. I am getting a compiler error that complains about this line:

#import "C:\usr\tyx\com\PublishersIO.exe" no_namespace

The error is:

2>c:\users\jew\onedrive - teradyne\desktop\arinc 818\hssub arinc 818 nam and subtps\source\nam\terfcnm\terfcnm\comnammessage.h(13): fatal error C1084: Cannot read type library file: 'C:\usr\tyx\com\PublishersIO.exe': Error loading type library/DLL.

How can I debug what is the specific issue that is causing the compiler error?

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,743 questions
{count} votes

1 answer

Sort by: Most helpful
  1. RLWA32 45,661 Reputation points
    2024-10-17T17:00:01.4366667+00:00

    How can I debug what is the specific issue that is causing the compiler error?

    You should verify that there is actually a type library embedded as a resource in the "C:\usr\tyx\com\PublishersIO.exe" file. You can see the .exe file's resources by opening it in the Visual Studio IDE.

    If you do see a type library resource expand the node and post a screenshot of what you see.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.