I am once again trying to call a MC++ method from a C# method. I am building
with the command line, not the IDE. This is my build file:
cl /clr mc.cpp
csc /r:mc.exe /t:module csh.cs
Here are the source files:
csh.cs
using System;
using MCfu;
namespace InHere
{
public class AppClass
{
static void CSFu1()
{
Console.WriteLine("In CSFu");
MCfu.MCClass.HereIsFu();
}
static void CSFu2()
{
Console.WriteLine("In CSFu");
}
}
}
Here is mc.cpp:
#using "mscorlib.dll"
#using <System.Windows.Forms.dll>
using namespace System;
namespace MCfu
{
class MCClass{
public: static void HereIsFu(void)
{
Console::WriteLine("HereIsFu");
}
};
}
int main(void)
{
Console::WriteLine("MCpp Main");
MCfu::MCClass::HereIsFu();
}
When I build, the C# build gives the following error:
csh.cs(2,7): error CS0246: The type or namespace 'MCfu' could not be found.
I would appreciate any suggestions about what is not correct. Thanks.