首页 > 其他分享 >dumpbin工具使用-由zlib编译前缀少加预处理器命令引起的异常-扩展

dumpbin工具使用-由zlib编译前缀少加预处理器命令引起的异常-扩展

时间:2023-07-06 14:37:10浏览次数:36  
标签:code dumpbin -- zlib 编译 PREFIX 处理器 少加预

对zlib使用vs2019编译,没有在预处理器中加前缀命令,导致编译出来的zlib.dll 与项目之前使用的函数名不一致,运行报错。

报错信息:无法在DLL“libz64”中找到名为“Z_inflateEnd”的入口点。

 在z.conf 中有以下注释:

/*
* If you *really* need a unique prefix for all types and library functions,
* compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
* Even better than compiling with -DZ_PREFIX would be to use configure to set
* this permanently in zconf.h using "./configure --zprefix".
*/
#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */

/* all linked symbols */
# define _dist_code z__dist_code
# define _length_code z__length_code
…………以下省略…………

这是种表明,如果要在函数库中加前缀需要使用 Z_PREFIX ,奈何对vs编译c++程序不了解,不知道这个命令该加在哪里,根据z.conf 的代码看到应该就是因为这个命令导致没有加上前缀: #ifdef Z_PREFIX /* may be set to #if 1 by ./configure */

最后找到问题解决方案:使用vs2019编译时需要在项目属性-->c/c++-->预处理器-->预处理定义中增加Z_PREFIX;注:编译win32版本zlib需要example、minigzip属性中也加Z_PREFIX 预处理器定义

 

标签:code,dumpbin,--,zlib,编译,PREFIX,处理器,少加预
From: https://www.cnblogs.com/zeran/p/17532037.html

相关文章

  • Could not locate zlibwapi.dll. Please make sure it is in your library path
    再跑CNN程序的时候报了这个错2023-06-2321:11:52.069321:Itensorflow/core/platform/cpu_feature_guard.cc:151]ThisTensorFlowbinaryisoptimizedwithoneAPIDeepNeuralNetworkLibrary(oneDNN)tousethefollowingCPUinstructionsinperformance-criticalop......
  • Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
     001、问题cmake报错[root@PC1build]#cmake.. 002、解决方法,下载zlib并安装官网:http://www.zlib.net/a、下载 b、解压并安装[root@PC1software]#tar-xzvfzlib-1.2.13.tar.gz[root@PC1software]#cdzlib-1.2.13/[[email protected]]#./configur......
  • 使用poi时报错:java.io.EOFException: Unexpected end of ZLIB input stream
    原文:点击查看代码FileexcelFile=newFile(filePath);try{if(excelFile.exists()){wb=newSXSSFWorkbook(newXSSFWorkbook(excelFile),1000,true);}else{wb=newSXSSFWorkbook(1000);}}catch(IOExceptione){logger.error(tra......
  • Python标准库zlib提供的数据压缩功能
    Python标准库zlib中提供的compress()和decompress()函数可以用于数据的压缩和解压缩,在压缩数据之前需要先想办法编码为字节串。>>>importzlib>>>x='Python程序设计系列图书,董付国编著,清华大学出版社'.encode()>>>len(x)72>>>y=zlib.compress(x)>>>len(y)#对于重......
  • 虚拟机上安装nginx、openssl、pcre、zlib步骤
    1、下载相关组件:wget http://nginx.org/download/nginx-1.10.2.tar.gzopenssl是一个开源的实现加解密和证书的专业系统。wget http://www.openssl.org/source/openssl-fips-2.0.10.tar.gzopenssl是一个开源的实现加解密和证书的专业系统。wgethttp://downloads.sourcefo......
  • mongodb压缩——snappy、zlib块压缩,btree索引前缀压缩
    MongoDB3.0WiredTigerCompressionandPerformanceOneofthemostexcitingdevelopmentsoverthelifetimeofMongoDBmustbetheinclusionoftheWiredTigerstorageengineinMongoDB3.0.Itsverydesignandcorearchitecturearelegionsaheadofthecurr......
  • spdy_zlib
    spdy_zlib:工具类,用于对数据进行deflate/gzip压缩,本身是对zlib库的定制化包装:<1>采用了头文件定义接口,实际实现类则通过继承此接口类在cc文件中定义,对外封闭。通过gz*get_context()获得可用的GZ对象(实际是实现类gzContextImpl的对象)<2>3个操......
  • telnet远程管理linux主机及Zlib、openssl、openssh升级1
    一、telent远程管理主机1.安装telent服务服务端:yuminstalltelnet-server-y#安装服务端useradddaipasswddai#创建lhj用户,设置lhj密码,密码有规则要求,大小写数字加符号,输2次即可客户端:yuminstalltelnet-y#安装客户端2.测试telent登录客户端:telnet192.......
  • windows10下编译zlib库
    系列文章目录文章目录系列文章目录前言一、问题原因二、准备具体操作编译zlib工程前言我使用CMake编译zlib源码,出现警告:CMakeDeprecationWarningatCMakeLists.txt:1(cmake_minimum_required):CompatibilitywithCMake<2.8.12willberemovedfromafutureversionofCM......
  • 【转】检查Linux系统下是否安装了gcc、pcre、zlib、openssl环境
    1.查看gcc环境gcc-v如果Linux系统没有安装gcc编译器,会提示“Commandnotfound”。如果系统上安装了gcc编译器,这条命令就会显示出当前安装的gcc编译器是哪个版本。下图展示为已安装的信息。 2. 查看pcre环境rpm-qapcre看到pcre的版本,说明已安装,否则未安装。......