简体   繁体   中英

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? 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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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