M
Michael Buechel
Hi NG,
I've copied this from the article Q309801
(http://support.microsoft.com/default.aspx?scid=kb;en-us;309801).
---- schnipp ---------
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
---- schnapp ---------
I've a similar problem by exporting a CArray derived class. In the article
the wrote the solution is to add
template class __declspec(dllimport) CStringT<TCHAR, StrTraitMFC<TCHAR,
ChTraitsCRT<TCHAR> > >;
template class __declspec(dllimport) CSimpleStringT<TCHAR>;
to your stdafx.h in your exe project.
I've tried to migrate the statement to my class by wrtiting:
// Forward declaration,
// @note The class CArgument is declared in the exe itself
class CArgument;
// TArray is my template derived from CArray
//
// template <typename _Ty, typename _A = const _Ty&>
// class AFX_EXT_CLASS TArray
// : public CArray<_Ty, _A>
// {
// :
// :
template class __declspec(dllimport) TArray<CArgument, const CArgument&>;
template class __declspec(dllimport) CArray<CArgument, const CArgument&>;
but i get also the LNK2019 error.
Does any one have an idea for this?
I've copied this from the article Q309801
(http://support.microsoft.com/default.aspx?scid=kb;en-us;309801).
---- schnipp ---------
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
---- schnapp ---------
I've a similar problem by exporting a CArray derived class. In the article
the wrote the solution is to add
template class __declspec(dllimport) CStringT<TCHAR, StrTraitMFC<TCHAR,
ChTraitsCRT<TCHAR> > >;
template class __declspec(dllimport) CSimpleStringT<TCHAR>;
to your stdafx.h in your exe project.
I've tried to migrate the statement to my class by wrtiting:
// Forward declaration,
// @note The class CArgument is declared in the exe itself
class CArgument;
// TArray is my template derived from CArray
//
// template <typename _Ty, typename _A = const _Ty&>
// class AFX_EXT_CLASS TArray
// : public CArray<_Ty, _A>
// {
// :
// :
template class __declspec(dllimport) TArray<CArgument, const CArgument&>;
template class __declspec(dllimport) CArray<CArgument, const CArgument&>;
but i get also the LNK2019 error.
Does any one have an idea for this?