问题
I'm updating a VS2010 C++ project to VS2019.
The project is importing several tlb files, and for each of these, VS2019 is giving an error that it "cannot open source file" for the .tlh file.
One of these is from a DLL that I've also upgraded (written in C#, built and registered OK in VS2019), and 2 others are 3rd party tlb files.
Here's an example of the import statement (in my header file)...
#import "../ExcelInterop/bin/Debug/ExcelInterop.tlb" raw_interfaces_only, raw_native_types, no_namespace, named_guids
The relative path is correct from the header file location.
How do I fix this error, and get VS2019 to correctly process my .tlb files?
来源:https://stackoverflow.com/questions/57751715/import-tlb-file-gives-cannot-open-source-file-x-tlh