hi,
in my vc++.net project using vs.net2003, i have 1 project where i
defined an __gc __interface called Iface compiled to a Iface.dll and
in another project which reference Iface.dll, there is a MyClass that
derives from the Iface.
however, i am getting this error C2504: 'Iface' : base class
undefined'
i understand the error, but cannot understand why the compiler cannot
find Iface.dll. Codes snapshot:
// MyClass.h
#using <mscorlib.dll>
// set the #using reference property in the project where Iface.dll is
#using <Iface.dll>
public __gc class MyClass : public Iface
{
......
};
i have included the Iface.dll with the #using directive, which i
thought should allow the compiler to find Iface.dll. Also set the
Reference node in solution explorer to also reference Iface.dll.
still, i get the above compilation error.
however, if i add #include "../project1/Iface.h" instead, the Iface is
found and no compilation error.
so i am a little puzzle with this. i thought #using <Iface.dll> should
do the trick and import the definition of Iface into MyClass, but
apparently it did not work. (for unmanaged C++, i do understand the
need, the inclusion of the header )
hope someone understands this, knows the problem and let me know. I
got many more of such code design and i need to fundamentally
understand why it does not work for managed c++.
thanks
meng