Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

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.

share|improve this question
2  
Mono is a C# compiler, not a C++ compiler, which is why it's generating errors when trying to compile your C++ code. –  Darius Makaitis Oct 1 '12 at 23:05
    
@dmakaitis Thanks! I guess I had assumed it did all .NET and not just C#. =) –  Nefariousity Oct 2 '12 at 15:35

1 Answer 1

up vote 2 down vote accepted

COM components are not cross plateform, and it works only on Windows OS, the equivalent cross plateform alternative is XPCOM used by Firefox for example.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.