For Programmers: Free Programming Magazines  


Home > Archive > VC STL > August 2005 > I can't pass CString or wstring to other project.









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author I can't pass CString or wstring to other project.
P

2005-08-16, 5:10 pm

Hi, I've had sub-project.
When I made a method which has 2 or 3 CString or std::wstring parameters,
it can pass it without any problem.

But, when I tried to make that kind of method in other project,
(it's tied by Dependency and I've set Unicode, Multi-Thread Dll Debug. All
Project have same settings)
it makes that kind of link error.

ClassWizard error LNK2019: unresolved external symbol "public: class
ATL::CStringT<wchar_t,class StrTraitMFC_DLL<wchar_t,class
ATL::ChTraitsCRT<wchar_t> > > __thiscall
maymfc::CPathInfo::GetFolderPath(enum maymfc::CPathInfo::FolderType)"
(?GetFolderPath@CPathInfo@maymfc@@QAE?AV?$CStringT@_WV?$StrTraitMFC_DLL@_WV? $ChTraitsCRT@_W@ATL@@@@@ATL@@W4FolderTyp
e@12@@Z)
referenced in function "private: void __thiscall
CClassWizardDlg::InitTheme(void)" (?InitTheme@CClassWizardDlg@@AAEXXZ)



(I tried to call CPathInfo::GetFolderPath() ( it return CString. ) from
CClassWizardDlg class.
The class method looks weird but, it just pilot program, anyway. :) )

So, what is the problem?
Before I try to UNICODE, that kind of problem doesn't happen, I guess.

Thanks in advance.


Josh McFarlane

2005-08-16, 5:10 pm

P wrote:
> ClassWizard error LNK2019: unresolved external symbol "public: class
> ATL::CStringT<wchar_t,class StrTraitMFC_DLL<wchar_t,class
> ATL::ChTraitsCRT<wchar_t> > > __thiscall
> maymfc::CPathInfo::GetFolderPath(enum maymfc::CPathInfo::FolderType)"
> (?GetFolderPath@CPathInfo@maymfc@@QAE?AV?$CStringT@_WV?$StrTraitMFC_DLL@_WV? $ChTraitsCRT@_W@ATL@@@@@ATL@@W4FolderTyp
e@12@@Z)
> referenced in function "private: void __thiscall
> CClassWizardDlg::InitTheme(void)" (?InitTheme@CClassWizardDlg@@AAEXXZ)


Make sure your library is properly linked into this project.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com