capstone/COMPILE_MSVC.TXT

67 lines
2.7 KiB
Plaintext
Raw Normal View History

2014-05-19 09:06:44 +00:00
This documentation explains how to compile Capstone on Windows using
Microsoft Visual Studio version 2010 or newer.
2014-05-17 16:39:49 +00:00
To compile Capstone on *nix, see COMPILE.TXT
To compile Capstone with CMake, see COMPILE_CMAKE.TXT
*-*-*-*-*-*
Capstone requires no prerequisite packages, so it is easy to compile & install.
2014-05-17 16:39:49 +00:00
Open the Visual Studio solution "msvc/capstone.sln" and follow the instructions
below.
NOTE: This requires Visual Studio 2010 or newer versions.
(0) Tailor Capstone to your need.
2014-05-26 15:02:48 +00:00
Out of 8 archtitectures supported by Capstone (Arm, Arm64, Mips, PPC, Sparc,
SystemZ, X86 & XCore), if you just need several selected archs, choose the ones
you want to compile in by opening Visual Studio solution "msvc\capstone.sln",
then directly editing the projects "capstone_static" & "capstone_dll" for static
2014-05-15 03:06:43 +00:00
and dynamic libraries, respectively. This must be done before going to the
next steps.
In VisualStudio interface, modify the preprocessor definitions via
"Project Properties" -> "Configuration Propertis" -> "C/C++" -> "Preprocessor"
to customize Capstone library, as followings.
- CAPSTONE_HAS_ARM: support ARM. Delete this to remove ARM support.
2014-05-15 03:06:43 +00:00
- CAPSTONE_HAS_ARM64: support ARM64. Delete this to remove ARM64 support.
- CAPSTONE_HAS_MIPS: support Mips. Delete this to remove Mips support.
- CAPSTONE_HAS_PPC: support PPC. Delete this to remove PPC support.
- CAPSTONE_HAS_SPARC: support Sparc. Delete this to remove Sparc support.
- CAPSTONE_HAS_SYSZ: support SystemZ. Delete this to remove SystemZ support.
- CAPSTONE_HAS_X86: support X86. Delete this to remove X86 support.
2014-05-26 15:02:48 +00:00
- CAPSTONE_HAS_XCORE: support XCore. Delete this to remove XCore support.
2014-05-26 15:02:48 +00:00
By default, all 8 architectures are compiled in.
Besides, Capstone also allows some more customization via following macros.
- CAPSTONE_USE_SYS_DYN_MEM: delete this to use your own dynamic memory management.
2014-05-15 03:06:43 +00:00
- CAPSTONE_DIET_NO: rename this to "CAPSTONE_DIET" to make the binaries more compact.
- CAPSTONE_X86_REDUCE_NO: rename this to "CAPSTONE_X86_REDUCE" to make X86 binary smaller.
- CAPSTONE_X86_ATT_DISABLE_NO: rename this to "CAPSTONE_X86_ATT_DISABLE" to disable
AT&T syntax on x86.
2014-05-15 03:06:43 +00:00
By default, Capstone use system dynamic memory management, and both DIET and X86_REDUCE
modes are disable.
For each option, refer to docs/README for more details.
2014-05-14 00:00:22 +00:00
(1) Compile from source on Windows with Visual Studio
2014-05-14 00:00:22 +00:00
- Choose the configuration and the platform you want: Release/Debug & Win32/Win64.
- Build only the libraries, or the libraries along with all the tests.
2014-05-10 15:22:59 +00:00
(2) You can make sure the prior steps successfully worked by launching one of the
2014-05-14 00:00:22 +00:00
testing binary (test*.exe).