Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
So what would you suggest, I have resolved the ambuguity errors by making slight modification. For example
Previously it was..

CEdit m_ctlUsedDuration;


I changed it to

MIDL
WTL::CEdit m_ctlUsedDuration;



Now the compiler is able to recognize that these classes belong to ATL not MFC, however it has spawn to some new errors listed below



1>LINK : warning LNK4199: /DELAYLOAD:OleAcc.dll ignored; no imports found from OleAcc.dll
1>UndoBox.obj : error LNK2001: unresolved external symbol "void __stdcall AfxThrowInvalidArgException(void)" (?AfxThrowInvalidArgException@@YGXXZ)
1>Utils.obj : error LNK2001: unresolved external symbol "void __stdcall AfxThrowInvalidArgException(void)" (?AfxThrowInvalidArgException@@YGXXZ)
1>Plug_In.obj : error LNK2001: unresolved external symbol "void __stdcall AfxThrowInvalidArgException(void)" (?AfxThrowInvalidArgException@@YGXXZ)
1>Project_Interface_Reports.obj : error LNK2001: unresolved external symbol "void __stdcall AfxThrowInvalidArgException(void)" (?AfxThrowInvalidArgException@@YGXXZ)
1>Project_Native.obj : error LNK2001: unresolved external symbol "void __stdcall AfxThrowInvalidArgException(void)" (?AfxThrowInvalidArgException@@YGXXZ)
1>Project_Reports.obj : error LNK2001: unresolved external symbol "void __stdcall AfxThrowInvalidArgException(void)" (?AfxThrowInvalidArgException@@YGXXZ)
1>AddIn.obj : error LNK2019: unresolved external symbol "void __stdcall AfxThrowInvalidArgException(void)" (?AfxThrowInvalidArgException@@YGXXZ) referenced in function "int __cdecl AfxCrtErrorCheck(int)" (?AfxCrtErrorCheck@@YAHH@Z)
1>Connect.obj : error LNK2001: unresolved external symbol "void __stdcall AfxThrowInvalidArgException(void)" (?AfxThrowInvalidArgException@@YGXXZ)
1>FilterBox.obj : error LNK2001: unresolved external symbol "void __stdcall AfxThrowInvalidArgException(void)" (?AfxThrowInvalidArgException@@YGXXZ)
1>InputBox.obj : error LNK2001: unresolved external symbol "void __stdcall AfxThrowInvalidArgException(void)" (?AfxThrowInvalidArgException@@YGXXZ)
1>Utils.obj : error LNK2001: unresolved external symbol "void __stdcall AfxThrowMemoryException(void)" (?AfxThrowMemoryException@@YGXXZ)
1>Project_Native.obj : error LNK2001: unresolved external symbol "void __stdcall AfxThrowMemoryException(void)" (?AfxThrowMemoryException@@YGXXZ)
1>Project_Reports.obj : error LNK2001: unresolved external symbol "void __stdcall AfxThrowMemoryException(void)" (?AfxThrowMemoryException@@YGXXZ)
1>Trial.obj : error LNK2001: unresolved external symbol "void __stdcall AfxThrowMemoryException(void)" (?AfxThrowMemoryException@@YGXXZ)
1>UndoBox.obj : error LNK2001: unresolved external symbol "void __stdcall AfxThrowMemoryException(void)" (?AfxThrowMemoryException@@YGXXZ)
1>InputBox.obj : error LNK2001: unresolved external symbol "void __stdcall AfxThrowMemoryException(void)" (?AfxThrowMemoryException@@YGXXZ)
1>Plug_In.obj : error LNK2001: unresolved external symbol "void __stdcall AfxThrowMemoryException(void)" (?AfxThrowMemoryException@@YGXXZ)
1>Project.obj : error LNK2001: unresolved external symbol "void __stdcall AfxThrowMemoryException(void)" (?AfxThrowMemoryException@@YGXXZ)
1>Project_Interface_Reports.obj : error LNK2001: unresolved external symbol "void __stdcall AfxThrowMemoryException(void)" (?AfxThrowMemoryException@@YGXXZ)
1>AddIn.obj : error LNK2019: unresolved external symbol "void __stdcall AfxThrowMemoryException(void)" (?AfxThrowMemoryException@@YGXXZ) referenced in function "int __cdecl AfxCrtErrorCheck(int)" (?AfxCrtErrorCheck@@YAHH@Z)
1>Application.obj : error LNK2001: unresolved external symbol "void __stdcall AfxThrowMemoryException(void)" (?AfxThrowMemoryException@@YGXXZ)
1>Connect.obj : error LNK2001: unresolved external symbol "void __stdcall AfxThrowMemoryException(void)" (?AfxThrowMemoryException@@YGXXZ)
1>FilterBox.obj : error LNK2001: unresolved external symbol "void __stdcall AfxThrowMemoryException(void)" (?AfxThrowMemoryException@@YGXXZ)
1>Project_Reports.obj : error LNK2019: unresolved external symbol "void __stdcall AfxThrowOleException(long)" (?AfxThrowOleException@@YGXJ@Z) referenced in function "public: __thiscall std::vector<class CCPM::CTaskError,class std::allocator<class CCPM::CTaskError> >::vector<class CCPM::CTaskError,class std::allocator<class CCPM::CTaskError> >(class std::vector<class CCPM::CTaskError,class std::allocator<class CCPM::CTaskError> > const &)" (??0?$vector@VCTaskError@CCPM@@V?$allocator@VCTaskError@CCPM@@@std@@@std@@QAE@ABV01@@Z)
1>Trial.obj : error LNK2001: unresolved external symbol "void __stdcall AfxThrowOleException(long)" (?AfxThrowOleException@@YGXJ@Z)
1>UndoBox.obj : error LNK2001: unresolved external symbol "void __stdcall AfxThrowOleException(long)" (?AfxThrowOleException@@YGXJ@Z)
1>Utils.obj : error LNK2001: unresolved external symbol "void __stdcall AfxThrowOleException(long)" (?AfxThrowOleException@@YGXJ@Z)
1>Plug_In.obj : error LNK2001: unresolved external symbol "void __stdcall AfxThrowOleException(long)" (?AfxThrowOleException@@YGXJ@Z)
1>Project.obj : error LNK2001: unresolved external symbol "void __stdcall AfxThrowOleException(long)" (?AfxThrowOleException@@YGXJ@Z)
1>Project_Interface_Reports.obj : error LNK2001: unresolved external symbol "void __stdcall AfxThrowOleException(long)" (?AfxThrowOleException@@YGXJ@Z)
1>Project_Native.obj : error LNK2001: unresolved external symbol "void __stdcall AfxThrowOleException(long)" (?AfxThrowOleException@@YGXJ@Z)
1>Application.obj : error LNK2001: unresolved external symbol "void __stdcall AfxThrowOleException(long)" (?AfxThrowOleException@@YGXJ@Z)
1>Connect.obj : error LNK2001: unresolved external symbol "void __stdcall AfxThrowOleException(long)" (?AfxThrowOleException@@YGXJ@Z)
1>FilterBox.obj : error LNK2001: unresolved external symbol "void __stdcall AfxThrowOleException(long)" (?AfxThrowOleException@@YGXJ@Z)
1>InputBox.obj : error LNK2001: unresolved external symbol "void __stdcall AfxThrowOleException(long)" (?AfxThrowOleException@@YGXJ@Z)
1>Connect.obj : error LNK2019: unresolved external symbol "public: void __thiscall CException::Delete(void)" (?Delete@CException@@QAEXXZ) referenced in function __catch$?CreateInstance@?$CComCreator@V?$CComObjectCached@VCComClassFactory@ATL@@@ATL@@@ATL@@SGJPAXABU_GUID@@PAPAX@Z$0
1>FilterBox.obj : error LNK2001: unresolved external symbol "public: void __thiscall CException::Delete(void)" (?Delete@CException@@QAEXXZ)
1>Plug_In.obj : error LNK2001: unresolved external symbol "public: void __thiscall CException::Delete(void)" (?Delete@CException@@QAEXXZ)
1>UndoBox.obj : error LNK2001: unresolved external symbol "public: void __thiscall CException::Delete(void)" (?Delete@CException@@QAEXXZ)
1>InputBox.obj : error LNK2019: unresolved external symbol "struct HINSTANCE__ * __stdcall AfxFindStringResourceHandle(unsigned int)" (?AfxFindStringResourceHandle@@YGPAUHINSTANCE__@@I@Z) referenced in function "public: static struct HINSTANCE__ * __cdecl StrTraitMFC<wchar_t,class ATL::ChTraitsCRT<wchar_t> >::FindStringResourceInstance(unsigned int)" (?FindStringResourceInstance@?$StrTraitMFC@_WV?$ChTraitsCRT@_W@ATL@@@@SAPAUHINSTANCE__@@I@Z)
1>Project_Interface_Reports.obj : error LNK2001: unresolved external symbol "struct HINSTANCE__ * __stdcall AfxFindStringResourceHandle(unsigned int)" (?AfxFindStringResourceHandle@@YGPAUHINSTANCE__@@I@Z)
1>Project_Reports.obj : error LNK2001: unresolved external symbol "struct HINSTANCE__ * __stdcall AfxFindStringResourceHandle(unsigned int)" (?AfxFindStringResourceHandle@@YGPAUHINSTANCE__@@I@Z)
1>Utils.obj : error LNK2001: unresolved external symbol "struct HINSTANCE__ * __stdcall AfxFindStringResourceHandle(unsigned int)" (?AfxFindStringResourceHandle@@YGPAUHINSTANCE__@@I@Z)
1>InputBox.obj : error LNK2019: unresolved external symbol "struct ATL::IAtlStringMgr * __stdcall AfxGetStringManager(void)" (?AfxGetStringManager@@YGPAUIAtlStringMgr@ATL@@XZ) referenced in function "public: static struct ATL::IAtlStringMgr * __cdecl StrTraitMFC<wchar_t,class ATL::ChTraitsCRT<wchar_t> >::GetDefaultManager(void)" (?GetDefaultManager@?$StrTraitMFC@_WV?$ChTraitsCRT@_W@ATL@@@@SAPAUIAtlStringMgr@ATL@@XZ)
1>Project_Interface_Reports.obj : error LNK2001: unresolved external symbol "struct ATL::IAtlStringMgr * __stdcall AfxGetStringManager(void)" (?AfxGetStringManager@@YGPAUIAtlStringMgr@ATL@@XZ)
1>Project_Reports.obj : error LNK2001: unresolved external symbol "struct ATL::IAtlStringMgr * __stdcall AfxGetStringManager(void)" (?AfxGetStringManager@@YGPAUIAtlStringMgr@ATL@@XZ)
1>Utils.obj : error LNK2001: unresolved external symbol "struct ATL::IAtlStringMgr * __stdcall AfxGetStringManager(void)" (?AfxGetStringManager@@YGPAUIAtlStringMgr@ATL@@XZ)
1>Trial.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall CFont::~CFont(void)" (??1CFont@@UAE@XZ) referenced in function "protected: long __thiscall CCPM::Dialogs::CTrial::OnInitDialog(unsigned int,unsigned int,long,int &)" (?OnInitDialog@CTrial@Dialogs@CCPM@@IAEJIIJAAH@Z)
1>Trial.obj : error LNK2019: unresolved external symbol "public: __thiscall CFont::operator struct HFONT__ *(void)const " (??BCFont@@QBEPAUHFONT__@@XZ) referenced in function "protected: long __thiscall CCPM::Dialogs::CTrial::OnInitDialog(unsigned int,unsigned int,long,int &)" (?OnInitDialog@CTrial@Dialogs@CCPM@@IAEJIIJAAH@Z)
1>Trial.obj : error LNK2019: unresolved external symbol "public: int __thiscall CFont::CreateFontW(int,int,int,int,int,unsigned char,unsigned char,unsigned char,unsigned char,unsigned char,unsigned char,unsigned char,unsigned char,wchar_t const *)" (?CreateFontW@CFont@@QAEHHHHHHEEEEEEEEPB_W@Z) referenced in function "protected: long __thiscall CCPM::Dialogs::CTrial::OnInitDialog(unsigned int,unsigned int,long,int &)" (?OnInitDialog@CTrial@Dialogs@CCPM@@IAEJIIJAAH@Z)
1>Trial.obj : error LNK2019: unresolved external symbol "public: __thiscall CFont::CFont(void)" (??0CFont@@QAE@XZ) referenced in function "protected: long __thiscall CCPM::Dialogs::CTrial::OnInitDialog(unsigned int,unsigned int,long,int &)" (?OnInitDialog@CTrial@Dialogs@CCPM@@IAEJIIJAAH@Z)
1>Debug/CCPM.dll : fatal error LNK1120: 10 unresolved externals




So can you help me in resolving these errors? I didn't mess up with any of the .lib file used. I guess once this thing is resolved I will be able to implement MFC with this project.

Otherwise you are always welcomed to tell me alternatives

Thanks in Advance
Posted
Updated 11-Feb-10 5:20am
v2

You are still using MFC, but don't link to it.

The easiest way I found is to recreate the Project as ATL project, tick "MFC support" in the wizard and re-add / merge the files.




btw. it would be more reader-friendly if you wouldn't just dump the linker output but listed what you figured out from it - e.g. listing the symbols that are not found.
 
Share this answer
 
This project already has 100s of files, resources. Creating a new ATL Project and adding all these files is not gonna be fun. These erroes comes if my active build is Debug mode, In Release mode I just receive 2 errors

<pre lang="msil">1>uafxcw.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in AddIn.obj
1>   Creating library Release/CCPM.lib and object Release/CCPM.exp
1>Release/CCPM.dll : fatal error LNK1169: one or more multiply defined symbols found

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900