Click here to Skip to main content
15,890,845 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
in the name of allah

hi everyone

i work with visual C++ 2008. when i compiled the project the below error will happend:

how can i solve these?

C++
Linking...
1>nafxcw.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in LIBCMT.lib(new.obj)
1>nafxcw.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) already defined in LIBCMT.lib(delete.obj)
1>nafxcw.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new[](unsigned int)" (??_U@YAPAXI@Z) already defined in libcpmt.lib(newaop.obj)
1>nafxcw.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z) already defined in LIBCMT.lib(delete2.obj)
1>Dlgcode.obj : error LNK2019: unresolved external symbol "public: void __thiscall Theme::Center2Top(int)" (?Center2Top@Theme@@QAEXH@Z) referenced in function _KeyfileGeneratorDlgProc@16
1>Keyfiles.obj : error LNK2001: unresolved external symbol "public: void __thiscall Theme::Center2Top(int)" (?Center2Top@Theme@@QAEXH@Z)
1>Dlgcode.obj : error LNK2019: unresolved external symbol "public: void __thiscall Theme::OnLButtonDown(unsigned int,class CPoint)" (?OnLButtonDown@Theme@@QAEXIVCPoint@@@Z) referenced in function _KeyfileGeneratorDlgProc@16
1>Keyfiles.obj : error LNK2001: unresolved external symbol "public: void __thiscall Theme::OnLButtonDown(unsigned int,class CPoint)" (?OnLButtonDown@Theme@@QAEXIVCPoint@@@Z)
1>Dlgcode.obj : error LNK2019: unresolved external symbol "public: void __thiscall Theme::OnLButtonUp(unsigned int,class CPoint)" (?OnLButtonUp@Theme@@QAEXIVCPoint@@@Z) referenced in function _KeyfileGeneratorDlgProc@16
1>Keyfiles.obj : error LNK2001: unresolved external symbol "public: void __thiscall Theme::OnLButtonUp(unsigned int,class CPoint)" (?OnLButtonUp@Theme@@QAEXIVCPoint@@@Z)
1>Dlgcode.obj : error LNK2019: unresolved external symbol "public: void __thiscall Theme::OnPaint(void)" (?OnPaint@Theme@@QAEXXZ) referenced in function _KeyfileGeneratorDlgProc@16
1>Keyfiles.obj : error LNK2001: unresolved external symbol "public: void __thiscall Theme::OnPaint(void)" (?OnPaint@Theme@@QAEXXZ)
1>Dlgcode.obj : error LNK2019: unresolved external symbol "public: void __thiscall Theme::AddButton(unsigned char,class CRect,bool)" (?AddButton@Theme@@QAEXEVCRect@@_N@Z) referenced in function _KeyfileGeneratorDlgProc@16
1>Keyfiles.obj : error LNK2001: unresolved external symbol "public: void __thiscall Theme::AddButton(unsigned char,class CRect,bool)" (?AddButton@Theme@@QAEXEVCRect@@_N@Z)
1>Dlgcode.obj : error LNK2019: unresolved external symbol "public: bool __thiscall Theme::AddImage(unsigned char,class ATL::CStringT<char,class StrTraitMFC<char,class ATL::ChTraitsCRT<char> > >,unsigned short,short)" (?AddImage@Theme@@QAE_NEV?$CStringT@DV?$StrTraitMFC@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@GF@Z) referenced in function _KeyfileGeneratorDlgProc@16
1>Keyfiles.obj : error LNK2001: unresolved external symbol "public: bool __thiscall Theme::AddImage(unsigned char,class ATL::CStringT<char,class StrTraitMFC<char,class ATL::ChTraitsCRT<char> > >,unsigned short,short)" (?AddImage@Theme@@QAE_NEV?$CStringT@DV?$StrTraitMFC@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@GF@Z)
1>Dlgcode.obj : error LNK2019: unresolved external symbol "public: bool __thiscall Theme::CreateTheme(class CRect,class CWnd *,unsigned short,unsigned short,bool)" (?CreateTheme@Theme@@QAE_NVCRect@@PAVCWnd@@GG_N@Z) referenced in function _KeyfileGeneratorDlgProc@16
1>Keyfiles.obj : error LNK2001: unresolved external symbol "public: bool __thiscall Theme::CreateTheme(class CRect,class CWnd *,unsigned short,unsigned short,bool)" (?CreateTheme@Theme@@QAE_NVCRect@@PAVCWnd@@GG_N@Z)
1>Dlgcode.obj : error LNK2019: unresolved external symbol "public: __thiscall Theme::Theme(unsigned char,unsigned char,unsigned char)" (??0Theme@@QAE@EEE@Z) referenced in function "void __cdecl `dynamic initializer for 'theme2''(void)" (??__Etheme2@@YAXXZ)
1>Keyfiles.obj : error LNK2001: unresolved external symbol "public: __thiscall Theme::Theme(unsigned char,unsigned char,unsigned char)" (??0Theme@@QAE@EEE@Z)
1>Dlgcode.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall Theme::~Theme(void)" (??1Theme@@UAE@XZ) referenced in function "void __cdecl `dynamic atexit destructor for 'theme2''(void)" (??__Ftheme2@@YAXXZ)
1>Keyfiles.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall Theme::~Theme(void)" (??1Theme@@UAE@XZ)
1>Release/TrueCryptFormat.exe : fatal error LNK1120: 9 unresolved externals


maybe i should change the properties of project or link or.... do i?

thanks
Posted
Comments
PIEBALDconsult 5-Feb-15 14:35pm    
By Grabthar's Hammer you probably have a couple of problems.
You may be including a header file more than once, and you may not have included a required library.
We can't tell without see the code and the compile statement.

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