请问如何关掉CxImage里不需要的图象格式
我在ximacfg.h里改了,但是还是提示需要lib的LNK:2001错误
能帮我看看吗大家谢谢了~:) #include "ximage.h"
#pragma comment(lib,"cximage.lib")
#pragma comment(lib,"Jpeg.lib")
#pragma comment(lib,"png.lib ")
#pragma comment(lib,"zlib.lib ")
//ximacfg.h
#define CXIMAGE_SUPPORT_BMP 1
#define CXIMAGE_SUPPORT_GIF 1
#define CXIMAGE_SUPPORT_JPG 1
#define CXIMAGE_SUPPORT_PNG 0
#define CXIMAGE_SUPPORT_MNG 0
#define CXIMAGE_SUPPORT_ICO 1
#define CXIMAGE_SUPPORT_TIF 0
#define CXIMAGE_SUPPORT_TGA 0
#define CXIMAGE_SUPPORT_PCX 0
#define CXIMAGE_SUPPORT_WBMP 0
#define CXIMAGE_SUPPORT_WMF 0
#define CXIMAGE_SUPPORT_J2K 0 // Beta, use JP2
#define CXIMAGE_SUPPORT_JBG 0 // GPL'd see ../jbig/copying.txt & ../jbig/patents.htm#define CXIMAGE_SUPPORT_JP2 1
#define CXIMAGE_SUPPORT_JPC 0
#define CXIMAGE_SUPPORT_PGX 0
#define CXIMAGE_SUPPORT_PNM 0
#define CXIMAGE_SUPPORT_RAS 0

解决方案 »

  1.   

    好像是编译选项问题吧。
    你的库的编译选项和EXE的选项设置一样不?主要看Code Generation一栏中是否一样。
      

  2.   

    对了在VC的Project Setting中进行设置了。
      

  3.   

       4年前用过CxImage,感觉挺好,没有问题。
        今天从http://www.codeproject.com/KB/graphics/cximage.aspx   down了个新版本,感觉非常好,里面有全部源码尤其是一个demo程序(http://www.codeproject.com/KB/graphics/cximage/cximage600_full.zip)。但在学习时候遇到问题,一直解决不了,请高手指点。有兴趣的高手,下载下来试一下。
        打开工作区CxImgLib.dsw,此时把demo设置为active,编译运行OK!非常好。
        进Demo文件夹中,有demo.dsw,此时编译后,OK,其实这时候根本就没有编译,直接用了上次的可执行程序。如果把demo中任何一个文件稍作修改,比如(填一个空行),此时编译链接都是Lnk2001错,一直说找不到CxImage.lib等。但我看了两天了,感觉他们的设置一模一样啊。郁闷死我了,已经2天没有睡好觉了。错误如下:   Compiling...
    demo.cpp
    demoDoc.cpp
    demoView.cpp
    Generating Code...
    Linking...
       Creating library ../bin/demou.lib and object ../bin/demou.exp
    cximage.lib(ximaraw.obj) : error LNK2001: unresolved external symbol _dcr_cleanup_dcraw
    cximage.lib(ximaraw.obj) : error LNK2001: unresolved external symbol _htons@4
    ..........................
    ................/bin/demou.exe : fatal error LNK1120: 24 unresolved externals
    Error executing link.exe.demou.exe - 25 error(s), 0 warning(s)