'type' : cannot import field - the type is inacessible
The field cannot be imported because the type is not accessible. To resolve the error, make the type public. To generate C3378, create two source code files and compile them as described below:
// a.cpp // compile with /com+ and /LD // creates a DLL called a.dll #using <mscorlib.dll> private __gc class X { // change 'private' to 'public' to resolve }; public __gc class Y { public: Y() { } X *m_pX; }; // b.cpp // compile with /com+ // creates an EXE called b.exe #using "a.dll" #using <mscorlib.dll> void main() { Y *pY = new Y; // C3378 }