zameericle
July 23rd, 2002, 10:49 AM
sorry if I am posting this in the wrong forum, but could anyone tell me why the following produces a warning:
/*This is in one file (CFoo.h) */
class DLL_EXPORT cFoo {...};
/* This is in the second file (CTest.h) */
#include "CFoo.h"
class DLL_EXPORT cTest {
protected:
cFoo _X;
};
/* The third file */
include "CTest.h"
class DLL_EXPORT cUser {
public:
void testme() {
//do something with cTest
}
};
when I compile the above code in Visual Studio I get the following warning:
_X : cFoo needs to have a dll-interface to be used by clients of cUser
can anyone help?? I figured that when you export a class, it's member variables/structures are exported as well??
thanks
Zameer
/*This is in one file (CFoo.h) */
class DLL_EXPORT cFoo {...};
/* This is in the second file (CTest.h) */
#include "CFoo.h"
class DLL_EXPORT cTest {
protected:
cFoo _X;
};
/* The third file */
include "CTest.h"
class DLL_EXPORT cUser {
public:
void testme() {
//do something with cTest
}
};
when I compile the above code in Visual Studio I get the following warning:
_X : cFoo needs to have a dll-interface to be used by clients of cUser
can anyone help?? I figured that when you export a class, it's member variables/structures are exported as well??
thanks
Zameer