intellisense无法在C ++中打开源文件“.tlb”

时间:2010-02-19 04:25:41

标签: c++

我想通过将其转换为.tlb来在C ++中部署我的C#dll。但是,当我将其导入C ++程序时,使用语句

#import "MyProject.tlb" named_guids raw_interfaces_only 

我发现错误

intellisense cannot open source file " c:/.../debug/MyProject.tlh"  
bad descriptor for file.

同时收到警告:

#import  skipped when looking for precompiled header use

有人可以帮助我吗?

1 个答案:

答案 0 :(得分:0)

您可能需要执行包装才能访问C#库。为此,您必须创建一个头文件,其中包含库的接口头:

#include "YC#library_interface.hpp"

您还需要实现包装器(SWIG ???

相关问题