Re: Linker error
"GT" <ContactGT_remove_@hotmail.com> ha scritto nel messaggio
news:00d748b8$0$311$c3e8da3@news.astraweb.com...
DbaseOpenReturnCode openDbase(CString filename, CString password1 =
_T(""), CString password2 = _T(""), bool templateFile = false);
I think this is the appropriate line from the dumpbin /exports output:
930 3A1 000E258F
?openDbase@Model@@QAE?AW4DbaseOpenReturnCode@@V?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@00_N@Z
=
@ILT+9610(?openDbase@Model@@QAE?AW4DbaseOpenReturnCode@@V?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@00_N@Z)
And this is the error message in VS2005 when my EXE tries to link:
1>dlgTest1.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: enum DbaseOpenReturnCode __thiscall
Model::openDbase(class ATL::CStringT<wchar_t,class
StrTraitMFC_DLL<wchar_t,class ATL::ChTraitsCRT<wchar_t> > >,class
ATL::CStringT<wchar_t,class StrTraitMFC_DLL<wchar_t,class
ATL::ChTraitsCRT<wchar_t> > >,class ATL::CStringT<wchar_t,class
StrTraitMFC_DLL<wchar_t,class ATL::ChTraitsCRT<wchar_t> > >,bool)"
Trying to "guess" some source code... Maybe in your DLL you are using
CString from ATL, but in your MFC code you are using CString from MFC (since
VC7.1, CString is just a *template* CStringT, and there are several
instantiations of this template for MFC, ATL, etc.)
I would suggest you to just use TCHAR *, const TCHAR *, or wchar_t*/const
wchar_t* in your DLL *interface* (of course, you are free to use robust
string classes like CString in your DLL *implementation*).
You would have no problem if your DLL exposes COM objects (they use standard
unique BSTR for strings).
Giovanni