• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Xcode Project for Capstone
2================================================================================
3
4The *Capstone.xcodeproj* project is an Xcode project that mimicks the Visual
5Studio solution for Capstone. It embeds nicely into Xcode workspaces. It has 13
6targets, two of which are the most likely to be of interest:
7
8* CapstoneStatic, producing `libcapstone.a`, Capstone as a static library;
9* CapstoneDynamic, producing `libcapstone.dylib`, Capstone as a shared library;
10* test, test_arm, test_arm64, test_detail, test_mips, test_ppc, test_skipdata,
11	test_sparc, test_systemz, test_xcore, testing all the things.
12
13The project is configured to include all targets and use the system
14implementations of `malloc`, `calloc`, `realloc`, `free` and `vsnprintf`. This
15can be modified by editing the *Preprocessor Macros* build setting of either
16CapstoneStatic or CapstoneDynamic, whichever you plan to use. These settings are
17all at the target level: no specific overrides were used at the project level.
18
19### A Word of Warning: Static vs. Shared Library
20
21There is a bug in how Xcode handles static libraries and dynamic libraries of
22the same name. Currently, if you integrate the Capstone project in a workspace
23and both the static *and* the dynamic libraries are built, if you try to link
24against either, you will *always* link against the dynamic one. To work around
25this issue, you can avoid building the dynamic library if you don't plan to use
26it, or you could change the *Product Name* build setting of either.