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 : [] 在编 ...
随机推荐
- ### Cause: java.lang.reflect.UndeclaredThrowableException
### Cause: java.lang.reflect.UndeclaredThrowableException Caused by: org.apache.ibatis.exceptions.Pe ...
- C++ 二叉搜索树
二叉搜索树利用其特有的二叉树性质,使其搜索更方便 源代码: struct node { int val; node *left, *right; }; //the function of insert ...
- perl语言入门总结-第2章
$what ='steak'; print "fred ate $n ${what}s.\n"; 布尔值 如果是数字0为假, 如果是空字符串''为假, 如果即不是数字也不是字符串, ...
- Python 文本挖掘:使用情感词典进行情感分析(算法及程序设计)
出处:http://www.ithao123.cn/content-242299.html 情感分析就是分析一句话说得是很主观还是客观描述,分析这句话表达的是积极的情绪还是消极的情绪. 原理 比如 ...
- git 设置别名 git alias
git config --global alias.st status git config --global alias.ck checkout git config --global alias. ...
- 算法:枚举法---kotlin
枚举法:效率低,循环所有的情况,找到正确答案 用于解决数学问题,还是很简单的. 比如,奥数里面: 算 法 描 述 题X题=题题题题题题 其中 算法描述题每一个为一个数字,请写出正确的数字. ok,我们 ...
- 点击事件处理, 以及hitTest:withEvent:实现
发送触摸事件后, 系统会将事件添加到系统UIApplication的事件管理队列中 UIApplication会在事件队列的最前端取出事件,然后分发下去,以便处理, 通常会把事件首先分发给KeyWin ...
- Windows Phone 图片扩展类
using System.IO; using System.Text; using System.Net; using System.Threading.Tasks; using System.Win ...
- 【Dual Support Vector Machine】林轩田机器学习技法
这节课内容介绍了SVM的核心. 首先,既然SVM都可以转化为二次规划问题了,为啥还有有Dual啥的呢?原因如下: 如果x进行non-linear transform后,二次规划算法需要面对的是d`+1 ...
- IDEA调试快捷键
F9 resume programe 恢复程序 F8 Step Over 相当于eclipse的f6 跳到下一步 Ctrl+Shift+F,全局查 ...