简体   繁体   English

C ++ .NET DLL包装到C#COM DLL(使用Mono构建)

[英]C++ .NET DLL wrapper to a C# COM DLL (built with Mono)

I have a C++ .NET COM DLL wrapper to a C# COM DLL and I was curious, would it be possible to build the wrapper using Mono on UNIX? 我有C#COM DLL的C ++ .NET COM DLL包装器,我很好奇,是否可以在UNIX上使用Mono构建包装器? When I try, I get a lot of errors like these: 当我尝试时,我遇到了很多这样的错误:

$>/opt/mono/bin/mcs /target:library *.cpp -recurse:'*.cpp' -warn:0 -out:my.dll -r:System.Windows.Forms.dll -r:System.Data.dll -r:System.Xml.Linq.dll

/AssemblyInfo.cpp(2,18): error CS1024: Wrong preprocessor directive
/AssemblyInfo.cpp(4,6):  error CS1041: Identifier expected, `namespace' is a keyword
/AssemblyInfo.cpp(4,22): error CS1001: Unexpected symbol `;', expecting identifier
/AssemblyInfo.cpp(42,1): error CS8025: Parsing error

I'm still new to COM and Mono, so I apologize if this idea is fundamentally flawed. 我还是COM和Mono的新手,所以如果这个想法存在根本缺陷,我会道歉。

PS. PS。 If there's an interest I can include the actual code, but I'm more curious about the general mechanics. 如果有兴趣我可以包含实际的代码,但我对一般的机制更加好奇。

COM组件不是交叉平台,它只适用于Windows操作系统,等效的交叉平台替代方案是Firefox使用的XPCOM

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM