[英]C++ .NET DLL wrapper to a C# COM DLL (built with Mono)
我有C#COM DLL的C ++ .NET COM DLL包裝器,我很好奇,是否可以在UNIX上使用Mono構建包裝器? 當我嘗試時,我遇到了很多這樣的錯誤:
$>/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
我還是COM和Mono的新手,所以如果這個想法存在根本缺陷,我會道歉。
PS。 如果有興趣我可以包含實際的代碼,但我對一般的機制更加好奇。
COM組件不是交叉平台,它只適用於Windows操作系統,等效的交叉平台替代方案是Firefox使用的XPCOM 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.