###Build your own Pin tool from scratch with Visual Studio 2010 Intel PIN is a Dynamic Binary Instrumentation framework.
Building a pin tool from scratch is quite an intensive process and is not documented elsewhere. The official pin docs advises to use the sample project as a starting template.
Here I am depicting the steps to build a pin tool from a blank visual studio project. This is tested with Visual Studio 2010 and should also work with other versions.
Directory where pin is extracted: C:\pin
Project type : dll
####Project Options
C\C++
Additional include directories:
C:\pin\source\include\pin;
C:\pin\source\include\pin\gen;
C:\pin\extras\components\include;
C:\pin\extras\xed2-ia32\include;
Preprocessor definitions:
TARGET_IA32
HOST_IA32
TARGET_WINDOWS
WIN32
Runtime library:
Multi-threaded DLL (/MD)
Additional options:
/D_SECURE_SCL=0
Linker
Additional library directories:
C:\pin\ia32\lib
C:\pin\ia32\lib-ext
C:\pin\extras\xed2-ia32\lib
Additional dependencies:
pin.lib
libxed.lib
libcpmt.lib
libcmt.lib
pinvm.lib
kernel32.lib
ntdll-32.lib
Ignore all default libraries:
Yes (/NODEFAULTLIB)
Subsystem:
Not Set
EntryPoint:
Ptrace_DllMainCRTStartup%4012
Additional options:
/export:main