idos
Hi,
I am trying to make chatting program like msn, at first the whole sending message thing was done in unmanaged C++, but then my supervisor ask me to add GUI with C++.Net which is managed.
I spent some time google-ing to find how to comunicate between the two, as the unmanaged component needs to call method in the managed and vice -versa. Fortunately I finally found out that I can do it with gcroot<T>.
However I keep getting the same error:
Error 1 error C2065: 'Form1' : undeclared identifier e:\code\gui3\gui3\server\MyUnManaged.h 105
My code look like as follows:
// in the managed
#include "MyUnManaged.h"
namespace GUI {
public ref class Form1 : public Form{
MyUnManaged * unmanaged;
public:
Form1()
{
unmanaged = new MyUnManaged();
}
private:
void methodThatWillCalledSomeUnmanagedMethod();
public:
void methodToBeCalledByUnmanaged();
}
}
// in the unmanaged
#include "Form1.h"
class MyUnManaged {
gcroot<Form1^> gui;
};
Is this problem because of the gcroot<T> Do I implement it the right way
OR is it a problem of circular dependencies if it is a circular dependencies, I actually have tried to do forward declaration, but the error remains.
Can some one help me please .....