Original Post
here is the warning. d:\main\component\component.h(9) : warning C4275: non dll-interface class 'CDXUTStatic' used as base for dll-interface class 'MyComponent' d:\main\component\dxut\optional\dxutgui.h(688) : see declaration of 'CDXUTStatic' d:\main\component\component.h(9) : see declaration of 'MyComponent' this is the class declaration #ifndef ECLASS #define ECLASS class _declspec(dllexport) #endif ECLASS MyComponent:public CDXUTStatic{ public: static int count; MyComponent(CDXUTDialog* pDialog):CDXUTStatic(pDialog){fTotalTime =0;count++;} virtual void Render( float fElapsedTime ); private: double fTotalTime; }; int MyComponent::count = 0; Here is the base class's declaration class CDXUTStatic : public CDXUTControl { public: CDXUTStatic( CDXUTDialog* pDialog = NULL ); virtual void Render( float fElapsedTime ); virtual BOOL ContainsPoint( POINT pt ) { return false; } HRESULT GetTextCopy( LPWSTR strDest, UINT bufferCount ); LPCWSTR GetText() { return m_strText; } HRESULT SetText( LPCWSTR strText ); protected: WCHAR m_strText[MAX_PATH]; // Window text };