0

How can I use a c++ dll made from eclipse on visual studio 2012 c#? I already made the dll and tried to reference it in c# but visual studio gives an error that " A Reference to "....dll" could not be added please make sure that it is a valid assembly or com".

I have read about it needs to be a managed com or something? If so, How can I do that in my eclipse c++ dll?

  • extern "C" __cdecl(dllexport) blabla_keywords blablaFunction {} to stop name mangling in that C++ code. Then [DllImport("xyz.dll")]extern static blablakeyword blablamyFunc() as a specifier in C# – huseyin tugrul buyukisik Feb 18 '14 at 22:00

1 Answers1

0

I made a pretty complete tutorial as an answer of another question here on Stack Overflow.

See How to access class in C++/CLI from C#?

It's not directly answering your question, but it may help you building the dll from Visual Studio which might be easier in that particular case and with this particular goal.

Edit: Other similar questions that might help you or others.

How to Use C++/CLI Within C# Application

How do I call C++/CLI from C#?

Community
  • 1
  • 1
Emile Bergeron
  • 17,074
  • 5
  • 83
  • 129