您的位置:首页 > 产品设计 > UI/UE

How to build zlib 1.2.3 using Visual Studio 2008 for 32-bit and 64-bit Windows

2009-10-22 23:50 741 查看

In 3 easy steps

1. Download already working zlib123.zip
which contains the source code and VC2008 projects that I use.

2. With Visual Studio 2008 open appropriate SLN file in
zlib123/projects/visualc-x86 for 32-bit target or
zlib123/projects/visualc-x64 for 64-bit target.

3. Pick the output type (DLL, LIB, with or without ASM, etc) and build it

In 6 steps if you want to use existing zlib123 source

1. Assuming you have zlib 123 or download zlib 1.2.3 source from SourceForge.net: PNG reference library
or any other open source repository

2. Fix the Win32 ASM code to fix a bug:

Error you get if you try to build the ASM code:

inffas32.asm(647) : error A2070: invalid instruction operands

inffas32.asm(649) : error A2070: invalid instruction operands

inffas32.asm(663) : error A2070: invalid instruction operands

inffas32.asm(720) : error A2070: invalid instruction operands

All these are due to the same problem, fix as following:

- movd mm7,[esi]

+ movd mm7,dword ptr
[esi]


3. Download the appropriate target project files from this site:

Visual Studio 2008 32-bit projects

Visual Studio 2008 64-bit projects

4. Unzip the contents to zlib123/projects folder (there should already
be a visualc6 directory, these zips will add a visualc9-XXX folder
depending on platform)

5. Open the SLN file with Visual Studio 2008

6. Pick the target and build it

This assumes you have ml.exe and ml64.exe (check .../Microsoft Visual
Studio 9.0/VC/bin/ for ml.exe and .../Microsoft Visual Studio
9.0/VC/BIN/amd64/ for ml64.exe)

If not there download them from Microsoft
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐