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.zipwhich 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 libraryor 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
相关文章推荐
- How to build python3.3 using Visual Studio 2012 Ultimate
- How to build an OLE DB application for SQL Server CE in Visual Studio 2005
- How to build a binary XPCOM component using Visual Studio
- ArcGIS Engine Controls fail to build using Visual Studio 2010 on a 64-bit OS
- How to compile a C/C++ DLL for 64 bit with Visual Studio?
- If you have multiple web application run how to determin which is yours when you debug using visual studio 2008?
- 项目管理实践【五】自动编译和发布网站【Using Visual Studio with Source Control System to build and publish website autom
- Setting environment for using Microsoft Visual Studio 2008 x86 tools出现此时不应有的解决办法
- Using Threading to Build a Responsive Application with Visual Studio 2005
- How to disable Intellisense in Visual Studio 2008?
- Deploying COM Add-ins for 64-bit Office using Visual Studio (Saaid Khan for Nathan Halstead)
- How to use Intel C++ Compiler in Visual Studio 2008
- How to run 32 bit .NET Windows apps on 64 bit Windows (including with IEExec)
- How to compile the IJG JPEG library (libjpeg) for Visual Studio 2010
- C++--How to configure Visual Studio for compiling drivers
- How to develop Silverlight 4 using Visual Studio Express 2010
- How to get Intellisense for Web.config and App.config in Visual Studio .NET?(转载)
- How to Check for 32 or 64 Bit Fedora
- 项目管理实践【五】自动编译和发布网站【Using Visual Studio with Source Control System to build and publish website automatically】