我在学cximage,呵呵,只不过刚开始。
首先我看了demo,想抄抄它的代码做做看,我从打开一个图像开始,我从 demoDoc.cppp里copy BOOL CDemoDoc::OnOpenDocument(LPCTSTR lpszPathName)  到自己的文件里,然后补充缺少的函数与变量以及包含文件。一切编译过去了,没有缺少函数与变量以及包含文件,但确出现了 link error
--------------------Configuration: demo - Win32 Debug--------------------
Linking...
   Creating library Debug/demo.lib and object Debug/demo.exp
demo.obj : error LNK2001: unresolved external symbol "public: virtual long __thiscall CxMemFile::GetC(void)" (?GetC@CxMemFile@@UAEJXZ)
demoDoc.obj : error LNK2001: unresolved external symbol "public: virtual long __thiscall CxMemFile::GetC(void)" (?GetC@CxMemFile@@UAEJXZ)
demoView.obj : error LNK2001: unresolved external symbol "public: virtual long __thiscall CxMemFile::GetC(void)" (?GetC@CxMemFile@@UAEJXZ)
demo.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CxMemFile::PutC(unsigned char)" (?PutC@CxMemFile@@UAE_NE@Z)
demoDoc.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CxMemFile::PutC(unsigned char)" (?PutC@CxMemFile@@UAE_NE@Z)
demoView.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CxMemFile::PutC(unsigned char)" (?PutC@CxMemFile@@UAE_NE@Z)
demo.obj : error LNK2001: unresolved external symbol "public: virtual long __thiscall CxMemFile::Error(void)" (?Error@CxMemFile@@UAEJXZ)
demoDoc.obj : error LNK2001: unresolved external symbol "public: virtual long __thiscall CxMemFile::Error(void)" (?Error@CxMemFile@@UAEJXZ)
demoView.obj : error LNK2001: unresolved external symbol "public: virtual long __thiscall CxMemFile::Error(void)" (?Error@CxMemFile@@UAEJXZ)
demo.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CxMemFile::Eof(void)" (?Eof@CxMemFile@@UAE_NXZ)
demoDoc.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CxMemFile::Eof(void)" (?Eof@CxMemFile@@UAE_NXZ)
demoView.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CxMemFile::Eof(void)" (?Eof@CxMemFile@@UAE_NXZ)
demo.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CxMemFile::Flush(void)" (?Flush@CxMemFile@@UAE_NXZ)
demoDoc.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CxMemFile::Flush(void)" (?Flush@CxMemFile@@UAE_NXZ)
demoView.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CxMemFile::Flush(void)" (?Flush@CxMemFile@@UAE_NXZ)

demo.exe - 75 error(s), 0 warning(s)
大家帮我看看,还要做什么?我看demo里的 tool-》options-》directories 里也没有什么要添加的,不知道为什么。谢谢指点。

解决方案 »

  1.   

    噢,my god,真是一语吓醒梦中人,我一直觉的是什么地方没弄好,只检查tool-》options-》directories ,忘了Projects->Setting这里也要检查,谢谢啦。
      

  2.   

    你只加了类函数的声明,实现部分没有加。或者是cpp文件,或者是一个lib文件。
      

  3.   

    链接部分好像是克服了。但是我做的demo还是不能正常运行,哪为有用过cximage的帮我看看好吗?我全是copy cximage 中的demo的代码,帮我对比一下这个错误,我为什么一直打不开图像文件呢?不甚感激。谢谢。下载 httk://www.httk.net/demo.rar