Intel PIN is an awesome dynamic binary instrumentation framework. I've been using version 2.14 (build 71313) for a long time and decided to switch to the latest version today. Well, if you're using Visual Studio, you will have troubles building the sample projects shipped with the framework, not to talk about setting up projects from scratch.
If you're using version pin-3.0-76991-msvc-windows and you try to build any PinTool from the source/tools/ directory, you will be getting the following errors:
1>stlport-static.lib(ios.obj) : warning LNK4049: locally defined symbol ___sF imported
1>pin.lib(pin_client.obj) : warning LNK4217: locally defined symbol ___sF imported in function "void __cdecl LEVEL_PINCLIENT::StartProgram(void)" (?StartProgram@LEVEL_PINCLIENT@@YAXXZ)
1>pin.lib(swmalloc.obj) : warning LNK4049: locally defined symbol ___sF imported
1>xed.lib(xed-util.obj) : warning LNK4049: locally defined symbol ___sF imported
1>stlport-static.lib(iostream.obj) : warning LNK4049: locally defined symbol ___sF imported
1>pin.lib(ipc_client_windows.obj) : error LNK2001: unresolved external symbol _atexit
1>stlport-static.lib(iostream.obj) : error LNK2001: unresolved external symbol _atexit
1>stlport-static.lib(allocators.obj) : error LNK2001: unresolved external symbol _atexit
1>stlport-static.lib(locale_impl.obj) : error LNK2001: unresolved external symbol _atexit
1>pin.lib(flags_ia32.obj) : error LNK2001: unresolved external symbol _atexit
1>pin.lib(sm_client.obj) : error LNK2001: unresolved external symbol _atexit
1>pin.lib(reg.obj) : error LNK2001: unresolved external symbol _atexit
1>pin.lib(ins_reuse_ia32.obj) : error LNK2001: unresolved external symbol _atexit
1>pin.lib(comment.obj) : error LNK2001: unresolved external symbol _atexit
1>pin.lib(elf_windows.obj) : error LNK2001: unresolved external symbol _atexit
1>pin.lib(ins_inits_api_xed_ia32.obj) : error LNK2001: unresolved external symbol _atexit
1>pin.lib(cpu_info_ia32.obj) : error LNK2001: unresolved external symbol _atexit
1>pin.lib(complexlock.obj) : error LNK2001: unresolved external symbol _atexit
1>pin.lib(app.obj) : error LNK2001: unresolved external symbol _atexit
1>pin.lib(img.obj) : error LNK2001: unresolved external symbol _atexit
1>pin.lib(util_unicode_windows.obj) : error LNK2001: unresolved external symbol _atexit
1>pin.lib(deprecated_client.obj) : error LNK2001: unresolved external symbol _atexit
1>pin.lib(cache_client.obj) : error LNK2001: unresolved external symbol _atexit
1>pin.lib(child_process_client.obj) : error LNK2001: unresolved external symbol _atexit
1>pin.lib(aoti.obj) : error LNK2001: unresolved external symbol _atexit
1>pin.lib(parser.obj) : error LNK2001: unresolved external symbol _atexit
1>pin.lib(stripe.obj) : error LNK2001: unresolved external symbol _atexit
1>pin.lib(ins_xed_ia32.obj) : error LNK2001: unresolved external symbol _atexit
1>pin.lib(debugger_client.obj) : error LNK2001: unresolved external symbol _atexit
1>pin.lib(ins_ia32.obj) : error LNK2001: unresolved external symbol _atexit
1>pin.lib(ins_api_xed_ia32.obj) : error LNK2001: unresolved external symbol _atexit
1>pin.lib(sec.obj) : error LNK2001: unresolved external symbol _atexit
1>pin.lib(rtn.obj) : error LNK2001: unresolved external symbol _atexit
1>pin.lib(edg.obj) : error LNK2001: unresolved external symbol _atexit
1>pin.lib(chunk.obj) : error LNK2001: unresolved external symbol _atexit
1>pin.lib(rel.obj) : error LNK2001: unresolved external symbol _atexit
1>pin.lib(ins.obj) : error LNK2001: unresolved external symbol _atexit
1>pin.lib(stat.obj) : error LNK2001: unresolved external symbol _atexit
1>pin.lib(bigarray.obj) : error LNK2001: unresolved external symbol _atexit
1>pin.lib(ext.obj) : error LNK2001: unresolved external symbol _atexit
1>pin.lib(sym.obj) : error LNK2001: unresolved external symbol _atexit
1>pin.lib(bbl.obj) : error LNK2001: unresolved external symbol _atexit
1>pin.lib(pin_client.obj) : error LNK2001: unresolved external symbol _atexit
1>pin.lib(image.obj) : error LNK2001: unresolved external symbol _atexit
1>pin.lib(swmalloc.obj) : error LNK2001: unresolved external symbol _atexit
1>MyPinTool.obj : error LNK2001: unresolved external symbol _atexit
1>pin.lib(message.obj) : error LNK2001: unresolved external symbol _atexit
1>pin.lib(util.obj) : error LNK2001: unresolved external symbol _atexit
1>pin.lib(knob.obj) : error LNK2001: unresolved external symbol _atexit
1>pin.lib(ms_dllcrt.obj) : error LNK2019: unresolved external symbol __CRT_INIT@12 referenced in function _Ptrace_DllMainCRTStartup@12
1>c-static.lib(fpclassify.obj) : error LNK2001: unresolved external symbol __fltused
1>c-static.lib(strtold.obj) : error LNK2001: unresolved external symbol __fltused
1>c-static.lib(dtoa.obj) : error LNK2001: unresolved external symbol __fltused
1>c-static.lib(strtodg.obj) : error LNK2001: unresolved external symbol __fltused
1>c-static.lib(vfwprintf.obj) : error LNK2001: unresolved external symbol __fltused
1>c-static.lib(wcstold.obj) : error LNK2001: unresolved external symbol __fltused
1>c-static.lib(ulp.obj) : error LNK2001: unresolved external symbol __fltused
1>c-static.lib(wchar.obj) : error LNK2001: unresolved external symbol __fltused
1>c-static.lib(hdtoa.obj) : error LNK2001: unresolved external symbol __fltused
1>c-static.lib(ldtoa.obj) : error LNK2001: unresolved external symbol __fltused
1>c-static.lib(strtod.obj) : error LNK2001: unresolved external symbol __fltused
1>c-static.lib(vfprintf.obj) : error LNK2001: unresolved external symbol __fltused
1>c-static.lib(misc.obj) : error LNK2001: unresolved external symbol __fltused
1>c-static.lib(smisc.obj) : error LNK2001: unresolved external symbol __fltused
1>stlport-static.lib(num_get_float.obj) : error LNK2001: unresolved external symbol __fltused
1>stlport-static.lib(monetary.obj) : error LNK2001: unresolved external symbol __fltused
1>stlport-static.lib(messages.obj) : error LNK2001: unresolved external symbol __fltused
1>stlport-static.lib(locale_catalog.obj) : error LNK2001: unresolved external symbol __fltused
1>stlport-static.lib(dll_main.obj) : error LNK2001: unresolved external symbol __fltused
1>stlport-static.lib(locale_impl.obj) : error LNK2001: unresolved external symbol __fltused
1>stlport-static.lib(num_put_float.obj) : error LNK2001: unresolved external symbol __fltused
1>stlport-static.lib(num_put.obj) : error LNK2001: unresolved external symbol __fltused
1>pin.lib(stat.obj) : error LNK2001: unresolved external symbol __fltused
1>pin.lib(ext.obj) : error LNK2001: unresolved external symbol __fltused
1>pin.lib(val.obj) : error LNK2001: unresolved external symbol __fltused
1>pin.lib(ipc_client_windows.obj) : error LNK2001: unresolved external symbol __fltused
1>pin.lib(util.obj) : error LNK2001: unresolved external symbol __fltused
1>pin.lib(knob.obj) : error LNK2001: unresolved external symbol __fltused
1>pin.lib(pin_client.obj) : error LNK2001: unresolved external symbol __fltused
1>pin.lib(sysfuncs_windows.obj) : error LNK2001: unresolved external symbol __fltused
You need to add crtbeginS.obj
to input files for linking:
The PinTools will now be compiled properly.