-------------------Configuration: imaginprocess1 - Win32 Debug--------------------
Linking...
imaginprocess1.obj : error LNK2005: "int __stdcall PaintDIB(struct HDC__ *,struct tagRECT *,struct HDIB__ *,struct tagRECT *,class CPalette *)" (?PaintDIB@@YGHPAUHDC__@@PAUtagRECT@@PAUHDIB__@@1PAVCPalette@@@Z) already defined in DIBAPI.OBJ
imaginprocess1.obj : error LNK2005: "int __stdcall CreateDIBPalette(struct HDIB__ *,class CPalette *)" (?CreateDIBPalette@@YGHPAUHDIB__@@PAVCPalette@@@Z) already defined in DIBAPI.OBJ
imaginprocess1.obj : error LNK2005: "char * __stdcall FindDIBBits(char *)" (?FindDIBBits@@YGPADPAD@Z) already defined in DIBAPI.OBJ
imaginprocess1.obj : error LNK2005: "unsigned long __stdcall DIBWidth(char *)" (?DIBWidth@@YGKPAD@Z) already defined in DIBAPI.OBJ
imaginprocess1.obj : error LNK2005: "unsigned long __stdcall DIBHeight(char *)" (?DIBHeight@@YGKPAD@Z) already defined in DIBAPI.OBJ
imaginprocess1.obj : error LNK2005: "unsigned short __stdcall PaletteSize(char *)" (?PaletteSize@@YGGPAD@Z) already defined in DIBAPI.OBJ
imaginprocess1.obj : error LNK2005: "unsigned short __stdcall DIBNumColors(char *)" (?DIBNumColors@@YGGPAD@Z) already defined in DIBAPI.OBJ
imaginprocess1.obj : error LNK2005: "unsigned short __stdcall DIBBitCount(char *)" (?DIBBitCount@@YGGPAD@Z) already defined in DIBAPI.OBJ
imaginprocess1.obj : error LNK2005: "void * __stdcall CopyHandle(void *)" (?CopyHandle@@YGPAXPAX@Z) already defined in DIBAPI.OBJ
imaginprocess1.obj : error LNK2005: "int __stdcall SaveDIB(struct HDIB__ *,class CFile &)" (?SaveDIB@@YGHPAUHDIB__@@AAVCFile@@@Z) already defined in DIBAPI.OBJ
imaginprocess1.obj : error LNK2005: "struct HDIB__ * __stdcall ReadDIBFile(class CFile &)" (?ReadDIBFile@@YGPAUHDIB__@@AAVCFile@@@Z) already defined in DIBAPI.OBJ
imaginprocess1.obj : error LNK2005: "int __stdcall DIBToPCX256(char *,class CFile &)" (?DIBToPCX256@@YGHPADAAVCFile@@@Z) already defined in DIBAPI.OBJ
imaginprocess1.obj : error LNK2005: "struct HDIB__ * __stdcall ReadPCX256(class CFile &)" (?ReadPCX256@@YGPAUHDIB__@@AAVCFile@@@Z) already defined in DIBAPI.OBJ
imaginprocess1.obj : error LNK2005: "public: static class CObject * __stdcall CDib::CreateObject(void)" (?CreateObject@CDib@@SGPAVCObject@@XZ) already defined in cdib.obj
imaginprocess1.obj : error LNK2005: "protected: static struct CRuntimeClass * __stdcall CDib::_GetBaseClass(void)" (?_GetBaseClass@CDib@@KGPAUCRuntimeClass@@XZ) already defined in cdib.obj
imaginprocess1.obj : error LNK2005: "public: virtual struct CRuntimeClass * __thiscall CDib::GetRuntimeClass(void)const " (?GetRuntimeClass@CDib@@UBEPAUCRuntimeClass@@XZ) already defined in cdib.obj
imaginprocess1.obj : error LNK2005: "class CArchive & __stdcall operator>>(class CArchive &,class CDib * &)" (??5@YGAAVCArchive@@AAV0@AAPAVCDib@@@Z) already defined in cdib.obj
imaginprocess1.obj : error LNK2005: "public: __thiscall CDib::CDib(void)" (??0CDib@@QAE@XZ) already defined in cdib.obj
imaginprocess1.obj : error LNK2005: "public: __thiscall CDib::CDib(class CSize,int)" (??0CDib@@QAE@VCSize@@H@Z) already defined in cdib.obj
imaginprocess1.obj : error LNK2005: "public: virtual __thiscall CDib::~CDib(void)" (??1CDib@@UAE@XZ) already defined in cdib.obj
imaginprocess1.obj : error LNK2005: "public: class CSize  __thiscall CDib::GetDimensions(void)" (?GetDimensions@CDib@@QAE?AVCSize@@XZ) already defined in cdib.obj
imaginprocess1.obj : error LNK2005: "public: int __thiscall CDib::AttachMapFile(char const *,int)" (?AttachMapFile@CDib@@QAEHPBDH@Z) already defined in cdib.obj
imaginprocess1.obj : error LNK2005: "public: int __thiscall CDib::CopyToMapFile(char const *)" (?CopyToMapFile@CDib@@QAEHPBD@Z) already defined in cdib.obj
imaginprocess1.obj : error LNK2005: "public: int __thiscall CDib::AttachMemory(void *,int,void *)" (?AttachMemory@CDib@@QAEHPAXH0@Z) already defined in cdib.obj
imaginprocess1.obj : error LNK2005: "public: unsigned int __thiscall CDib::UsePalette(class CDC *,int)" (?UsePalette@CDib@@QAEIPAVCDC@@H@Z) already defined in cdib.obj
imaginprocess1.obj : error LNK2005: "public: int __thiscall CDib::Draw(class CDC *,class CPoint,class CSize)" (?Draw@CDib@@QAEHPAVCDC@@VCPoint@@VCSize@@@Z) already defined in cdib.obj
imaginprocess1.obj : error LNK2005: "public: struct HBITMAP__ * __thiscall CDib::CreateSection(class CDC *)" (?CreateSection@CDib@@QAEPAUHBITMAP__@@PAVCDC@@@Z) already defined in cdib.obj
imaginprocess1.obj : error LNK2005: "public: int __thiscall CDib::MakePalette(void)" (?MakePalette@CDib@@QAEHXZ) already defined in cdib.obj
imaginprocess1.obj : error LNK2005: "public: int __thiscall CDib::SetSystemPalette(class CDC *)" (?SetSystemPalette@CDib@@QAEHPAVCDC@@@Z) already defined in cdib.obj
imaginprocess1.obj : error LNK2005: "public: struct HBITMAP__ * __thiscall CDib::CreateBitmap(class CDC *)" (?CreateBitmap@CDib@@QAEPAUHBITMAP__@@PAVCDC@@@Z) already defined in cdib.obj
imaginprocess1.obj : error LNK2005: "public: int __thiscall CDib::Compress(class CDC *,int)" (?Compress@CDib@@QAEHPAVCDC@@H@Z) already defined in cdib.obj
imaginprocess1.obj : error LNK2005: "public: int __thiscall CDib::Read(class CFile *)" (?Read@CDib@@QAEHPAVCFile@@@Z) already defined in cdib.obj
imaginprocess1.obj : error LNK2005: "public: int __thiscall CDib::ReadSection(class CFile *,class CDC *)" (?ReadSection@CDib@@QAEHPAVCFile@@PAVCDC@@@Z) already defined in cdib.obj
imaginprocess1.obj : error LNK2005: "public: int __thiscall CDib::Write(class CFile *)" (?Write@CDib@@QAEHPAVCFile@@@Z) already defined in cdib.obj
imaginprocess1.obj : error LNK2005: "public: virtual void __thiscall CDib::Serialize(class CArchive &)" (?Serialize@CDib@@UAEXAAVCArchive@@@Z) already defined in cdib.obj
imaginprocess1.obj : error LNK2005: "private: void __thiscall CDib::ComputePaletteSize(int)" (?ComputePaletteSize@CDib@@AAEXH@Z) already defined in cdib.obj
imaginprocess1.obj : error LNK2005: "private: void __thiscall CDib::ComputeMetrics(void)" (?ComputeMetrics@CDib@@AAEXXZ) already defined in cdib.obj
imaginprocess1.obj : error LNK2005: "public: void __thiscall CDib::Empty(void)" (?Empty@CDib@@QAEXXZ) already defined in cdib.obj
imaginprocess1.obj : error LNK2005: "private: void __thiscall CDib::DetachMapFile(void)" (?DetachMapFile@CDib@@AAEXXZ) already defined in cdib.obj
imaginprocess1.obj : error LNK2005: "public: static struct CRuntimeClass  CDib::classCDib" (?classCDib@CDib@@2UCRuntimeClass@@A) already defined in cdib.obj
imaginprocess1.obj : error LNK2005: "struct AFX_CLASSINIT  _init_CDib" (?_init_CDib@@3UAFX_CLASSINIT@@A) already defined in cdib.obj
MainFrm.obj : error LNK2001: unresolved external symbol "protected: void __thiscall CMainFrame::OnOpenFile(void)" (?OnOpenFile@CMainFrame@@IAEXXZ)
Debug/imaginprocess1.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.imaginprocess1.exe - 43 error(s), 0 warning(s)

解决方案 »

  1.   

    1.修改project->settings->c/c++->category:code grneration
    ->use runtime library:
    Multithreaded dll
    试试
      

  2.   

    Linker Tools Error LNK2005
    symbol already defined in objectThe given symbol, displayed in its decorated form, was multiply defined.TipsOne of the following may be a cause: The most common cause of this error is accidentally linking with both the single-threaded and multithreaded libraries. Ensure that the application project file includes only the appropriate libraries and that any third-party libraries have appropriately created single-threaded or multithreaded versions.
    The given symbol was a packaged function (created by compiling with /Gy) and was included in more than one file but was changed between compilations. Recompile all files that include the symbol.
    The given symbol was defined differently in two member objects in different libraries, and both member objects were used.
    An absolute was defined twice, with a different value in each definition.
      

  3.   

    楼上的已经说了,多半是你的程序中有重复定义的问题,检查一下头文件中的include