无法定位程序输入点GdiGetImageGraphicsContext于动态链接库zlib1.dll上,该怎么处理

无法定位程序输入点GdiGetImageGraphicsContext于动态链接库zlib1.dll上
请问产生这个错误的原因是啥?
我DEBUG编译正常,运行程序功能也正常,但是release版本编译就出现这个错误.把相关代码注释掉错误消失.但不知道啥导致的请大家帮我看看.
代码:
C/C++ code

    CString lname,sname;
    CString path = _T("");   
    CString temp = _T("");
    path = GetPath();
    int count = m_list.GetItemCount();    //获得列表项目数
    for(int i = 0; i < count; i++ )
    {
        lname =  m_list.GetItemText(i,0);         //循环读取每个文件
        CFile file1,file2;
        if (file1.Open(lname,CFile::modeRead) && (path != _T("")))   //判断如果打开成功并且存储路径存在则..
        {
            temp = path;
            sname = GetFileTitleFromFileName(lname,TRUE);  //获取文件全名
            path += sname;
            uLong slength;  
            slength =  compressBound (file1.GetLength());      //判断加密后文件大小
            file2.Open(path,CFile::modeCreate|CFile::modeWrite);   //打开创建加密后的文件
            Bytef *source = new Bytef [file1.GetLength()];            //new
            Bytef *dest = new Bytef [slength];                 //NEW
            while (file1.Read(source,_msize(source)))     //循环读取每个需要加密的文件
            {
                compress(dest,&slength,source,file1.GetLength());    //ZLIB加密函数
                file2.Write(dest,slength);           //写文件
            }
            delete [] source;
            delete [] dest;
            file1.Close();
            file2.Close();
            path.Empty( );      //清空路径
            path = temp;         
        }
    }    



------解决方案--------------------
用DEPENDS检查一下你的DLL有没有输出GdiGetImageGraphicsContext