[Mono-list] using namespace in C++ projects

Jonathan Pryor jonpryor at vt.edu
Thu Jul 28 10:41:28 EDT 2011


On Jul 26, 2011, at 5:29 PM, hessam wrote:
> I just want to add I'm having the same C# and C++ projects in .Net under
> windows and "using namepace" works without any problem in C++ project.
> And also my C++ code will be on the same namespace as C# codes and the main
> reason is I want to call the functions of C++ code from my C# and I prefer
> not to compile my C++ project into a dll and use them that way.

As Robert Jordan mentioned, Mono doesn't provide a C++/CLI compiler, so "C++ namespaces" are rather beside the point.

Even if Mono did have a C++/CLI compiler, you'd still be out of luck as C# can only (easily) interact with assemblies (i.e. a C++/CLI project generating a .dll), which you said you didn't want to generate, so even if you were solely on Microsoft .NET (which has C++/CLI support) you'd be up the creek.

 - Jon



More information about the Mono-list mailing list