Hi,
i have the problem described in this article (
http://support.microsoft.com/kb/309801); "You may receive an LNK2019 error message when you build a Visual C++ 2005 or Visual C++ .NET application that uses a CString-derived class from a DLL file".
It proposes "including" the following templates in my "StdAfx.h" file. How do i do that? I have tried various ways of including the following lines -using include or not and in various places, but the compiler keeps producing errors on "StdAfx.h".
Code:
template class __declspec(dllimport) CStringT<TCHAR, StrTraitMFC<TCHAR, ChTraitsCRT<TCHAR> > >;
template class __declspec(dllimport) CSimpleStringT<TCHAR>;
and this is the "StdAfx.h":
Code:
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#if !defined(AFX_STDAFX_H__5B936323_2668_4642_ADA6_15D9B143CE0E__INCLUDED_)
#define AFX_STDAFX_H__5B936323_2668_4642_ADA6_15D9B143CE0E__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__5B936323_2668_4642_ADA6_15D9B143CE0E__INCLUDED_)
Any ideas? Thanks