zlib编译不过(Error A2070)解决方法(转)
原文转自 http://dearymz.blog.163.com/blog/static/2056574200871010027435/
1、zlib是个很牛的东东,从http://www.zlib.net/可以获取到源码,但在VS2008下编译会报错:error PRJ0019: 某个工具从以下位置返回了错误代码: "Assembling...", 翻开BuildLog.htm查看其编译命令行ml.exe /nologo /c /coff /Cx /Zi /Fo".\Win32_DLL_ASM_Debug\inffas32.obj" "前面是我的路径\zlib123\contrib\masmx86\inffas32.asm", 然后将该命令放在"VS2008命令行提示"控制台下运行,报错的具体情况就很明显啦:
E:提示符>ml.exe /nologo /c /coff /Cx/Zi /Fo".\Win32_DLL_ASM_Debug\inffas32.obj" "我的路径\zlib123\contrib\masmx86\inffas32.asm"
Assembling: E:\开源项目\压缩\zlib 1.2.3\zlib123\contrib\masmx86\inffas32.asm
我的路径\zlib123\contrib\masmx86\inffas32.asm(647) : error A2070:invalid instruction operands
我的路径\zlib123\contrib\masmx86\inffas32.asm(649) : error A2070:invalid instruction operands
我的路径\zlib123\contrib\masmx86\inffas32.asm(663) : error A2070:invalid instruction operands
我的路径\zlib123\contrib\masmx86\inffas32.asm(720) : error A2070:invalid instruction operands
查下MSDN:
ML Nonfatal Error A2070
invalid instruction operands
One or more operands were not valid for the instruction with which they were specified.
(这个解释基本属于废话)
上网一查,发现别人也遇到相同的问题:http://svn.haxx.se/dev/archive-2005-11/0942.shtml。原因在于
It (Microsoft Macro Assembler 8.0, included with Visual C++ 2005 Express ) refuses to assemble a MOVD instruction with a memory operand with an implied size, and requires that "dword ptr" prefix the memory operand.
微软说这是by design,不是bug:
解决办法是把inffas32.asm中的4处出错的类似
movd mm4, [esp+0]
的汇编代码,添加dword ptr修饰符,改为
movd mm4,dword ptr [esp+0]
这样就能顺利编译、通过测试了。
参考:http://www.cppblog.com/tx7do/archive/2007/10/12/34014.aspx
2、 在以静态库方式使用zlib-1.2.6时,发现LNK2019报错:
error LNK2019: 无法解析的外部符号 _deflateEnderror LNK2019: 无法解析的外部符号 _deflateerror LNK2019: 无法解析的外部符号 _deflateInit_error LNK2019: 无法解析的外部符号 _inflateEnderror LNK2019: 无法解析的外部符号 _inflateerror LNK2019: 无法解析的外部符号 _inflateInit_
#ifdef _WIN32#define ZLIB_WINAPI#endif
zlib编译不过(Error A2070)解决方法(转)的更多相关文章
- php编译安装 报错 make ***[libphp5.la] Error 1解决方法
报错信息: /usr/bin/ld: cannot find -lltdl collect2: ld returned 1 exit status make: *** [libphp5.la] Err ...
- CentOS 7重装mysql编译过程报错解决方法
错误记录: [ 82%] Building C object libmysql/CMakeFiles/clientlib.dir/__/sql-common/client.c.o/usr/local/ ...
- CentOS 7 重装mysql编译过程报错解决方法
错误记录: [ 82%] Building C object libmysql/CMakeFiles/clientlib.dir/__/sql-common/client.c.o/usr/local/ ...
- 安裝jpeg-6b png error错误解决方法
安裝jpeg-6b png error错误解决方法 默认安裝jpeg-6b shell> wget ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar. ...
- MySQL主从失败 错误Got fatal error 1236解决方法
--MySQL主从失败 错误Got fatal error 1236解决方法 ----------------------------------------------------2014/05/1 ...
- mac 上运行cassandra出现的java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: : : unknown error错误解决方法
mac 上运行cassandra出现的java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostExce ...
- PHP failed to ptrace(PEEKDATA) pid 13659: Input/output error错误解决方法
PHP failed to ptrace(PEEKDATA) pid 13659: Input/output error错误解决方法 现在改linux内核文件打开限制<pre>ulimit ...
- php5.3.*编译出现make: *** [ext/gd/libgd/gd_compat.lo] Error 1 解决方法
升级系统,把php5.2.9升级到5.3.6,按照以前的编译参数,configure能正常通过,但是在make的时候提示: In file included from /root/php-5.3.6 ...
- xcode修改代码目录结构出现clang:error:nosuchfileordirectory解决方法
需要迁移一个开源工程的一部分内容到自己工程,迁移对方的工程到自己工程之后,因目录结构配置整理需要,对嵌入的工程目录进行了结构改变,编译后出现: clang: error: no such file o ...
- error MIDL2311 解决方法
error MIDL2311 : statements outside library block are illegal in mktyplib compatability mode : [] 在编 ...
随机推荐
- sigaction函数
sigaction函数是设置信号处理的接口.比signal函数更健壮 #include <signal.h> int sigaction(int signum, const struct ...
- 笔记-python-standard library-17.7 queue
笔记-python-standard library-17.7 queue 1. queue source code:Lib/queue.py 该模块实现了多生产者,多消费者队列. 此模块实现了所有 ...
- html_parser.py
coding=UTF-8 # HTML解释器 import re from bs4 import BeautifulSoup class htmlParser(): def parse(self, u ...
- <jsp:param>传参乱码问题
在添加参数的界面添加<%request.setCharacterEncoding("UTF-8");%> 实例代码: login_confirm.jsp <%@ ...
- 11.2,nginx负载均衡实验
Nginx负载均衡概述 Web服务器,直接面向用户,往往要承载大量并发请求,单台服务器难以负荷,我使用多台WEB服务器组成集群,前端使用Nginx负载均衡,将请求分散的打到我们的后端服务器集群中,实现 ...
- oracle 用户被锁定解锁方法
修改了用户密码,第二天过来发现用户被锁定,晚上走的时候还好好的 . alter profile DEFAULT limit FAILED_LOGIN_ATTEMPTS UNLIMITED; alter ...
- css3实现圆角边框渐变
<button class="border">112233</button> 创建button .border{ position: relative; b ...
- 【转载】Unity3D研究院之共享材质的巧妙用法(sharedMaterial效率问题)
如果你需要修改模型材质的颜色,或者是修改材质Shader的一些属性, 通常情况是用获取模型的Renderer组件,然后获取它的material属性. 举个简单的例子,修改颜色或者直接更换shader ...
- docker部署思路
1.docker安装2.拉取centos镜像或者Ubuntu镜像 看你用哪个3.使用镜像,run出来一个容器A4.进入容器A,安装uwsgi,把Django部署在下面5.在启动脚本中配置开机自启动脚本 ...
- [g2o]C++图优化库
g2o以图模型表达上述最小二乘问题:比较适合解决SLAM问题 http://openslam.org http://wiki.ros.org/g2o