Import .TLB file gives “cannot open source file x.tlh”

烂漫一生 提交于 2020-01-05 04:23:27

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!