2016-06-09 10 views
0

windows8 32 비트, Visual Studio 2012 및 Intel pintool (76991 버전)을 사용 중입니다.윈도우에서 확인되지 않은 외부 기호

link /DLL /EXPORT:main /NODEFAULTLIB /NOLOGO /INCREMENTAL:NO /MACHINE:x86 /ENTRY:Ptrace_DllMainCRTStartup /BASE:0xC5000000 /OPT:REF /out:obj-ia32/inscount0.dll inscount0.obj shmem_ritu.obj /LIBPATH:C:\Users\kunal\Downloads\pin-3.0-76991-msvc-windows\pin-3.0-76991-msvc-windows\ia32\lib /LIBPATH:C:\Users\kunal\Downloads\pin-3.0-76991-msvc-windows\pin-3.0-76991-msvc-windows\ia32\lib-ext /LIBPATH:C:\Users\kunal\Downloads\pin-3.0-76991-msvc-windows\pin-3.0-76991-msvc-windows\extras\xed-ia32\lib pin.lib libxed.lib libcpmt.lib libcmt.lib pinvm.lib kernel32.lib C:\Users\kunal\Downloads\pin-3.0-76991-msvc-windows\pin-3.0-76991-msvc-windows\ia32\lib-ext\ntdll-32.lib 
cl -c  -IC:\Users\kunal\Downloads\pin-3.0-76991-msvc-windows\pin-3.0-76991-msvc-windows\source\include -IC:\Users\kunal\Downloads\pin-3.0-76991-msvc-windows\pin-3.0-76991-msvc-windows\source\tools\InstLib -IC:\Users\kunal\Downloads\pin-3.0-76991-msvc-windows\pin-3.0-76991-msvc-windows\extras\xed2-ia32\include -IC:\Users\kunal\Downloads\pin-3.0-76991-msvc-windows\pin-3.0-76991-msvc-windows\extras\components\include -IC:\Users\kunal\Downloads\pin-3.0-76991-msvc-windows\pin-3.0-76991-msvc-windows\source/include/gen -IC:\Users\kunal\Downloads\pin-3.0-76991-msvc-windows\pin-3.0-76991-msvc-windows\source/include/pin -IC:\Users\kunal\Downloads\pin-3.0-76991-msvc-windows\pin-3.0-76991-msvc-windows\source/include/pin/gen  -DTARGET_IA32E -DHOST_IA32E -DTARGET_WINDOWS -IC:\minor\filesIncludeInVisualStudio inscount0.cpp 

그것은주고있다 오류 : 나는 명령을 사용하여 DLL을 creat에하는 개발자 명령 프롬프트를 사용하고 인터넷을 통해

LINK : error LNK2001: unresolved external symbol _Ptrace_DllMainCRTStartup 
inscount0.obj : error LNK2019: unresolved external symbol "public: void __cdecl LEVEL_BASE::MESSAGE_TYPE::MessageNoReturn(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,bool,enum PIN_ERRTYPE,int,...)" ([email protected][email protected][email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@HZZ) referenced in function "void __cdecl printip(unsigned int,void *,char *)" ([email protected]@[email protected]) 
inscount0.obj : error LNK2019: unresolved external symbol "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl LEVEL_BASE::AssertString(char const *,char const *,unsigned int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" ([email protected][email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@Z) referenced in function "void __cdecl printip(unsigned int,void *,char *)" ([email protected]@[email protected]) 
inscount0.obj : error LNK2019: unresolved external symbol "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl LEVEL_BASE::StringDec(unsigned __int64,unsigned int,char)" ([email protected][email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]) referenced in function "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl LEVEL_BASE::decstr(unsigned int,unsigned int)" ([email protected][email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]) 
inscount0.obj : error LNK2019: unresolved external symbol "public: __thiscall LEVEL_BASE::KNOB_BASE::KNOB_BASE(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,enum LEVEL_BASE::KNOB_MODE)" ([email protected][email protected]@[email protected][email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@Z) referenced in function "public: __thiscall LEVEL_BASE::KNOB<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::KNOB<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >(enum LEVEL_BASE::KNOB_MODE,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" ([email protected][email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@[email protected]@[email protected][email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]) 
inscount0.obj : error LNK2019: unresolved external symbol "public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl LEVEL_BASE::KNOB_BASE::StringKnobSummary(void)" ([email protected][email protected][email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@XZ) referenced in function "int __cdecl Usage(void)" ([email protected]@YAHXZ) 
inscount0.obj : error LNK2019: unresolved external symbol "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl LEVEL_CORE::INS_Disassemble(class LEVEL_CORE::INDEX<6>)" ([email protected][email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected][email protected]@@Z) referenced in function "void __cdecl Instruction(class LEVEL_CORE::INDEX<6>,void *)" ([email protected]@[email protected][email protected][email protected]@[email protected]) 
inscount0.obj : error LNK2019: unresolved external symbol "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const & __cdecl LEVEL_PINCLIENT::RTN_Name(class LEVEL_CORE::INDEX<3>)" ([email protected][email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected][email protected][email protected]@@Z) referenced in function "void __cdecl FlagRtn(class LEVEL_CORE::INDEX<3>,void *)" ([email protected]@[email protected][email protected][email protected]@[email protected]) 
inscount0.obj : error LNK2019: unresolved external symbol "public: static unsigned __int64 __cdecl LEVEL_BASE::KNOBVALUE<unsigned __int64>::FromString(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" ([email protected][email protected][email protected][email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@Z) referenced in function "public: void __thiscall LEVEL_BASE::KNOBVALUE<unsigned __int64>::Accumulate(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" ([email protected][email protected][email protected][email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@Z) 
inscount0.obj : error LNK2019: unresolved external symbol "public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const __cdecl LEVEL_BASE::KNOBVALUE<unsigned __int64>::Type(void)" ([email protected][email protected][email protected][email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@XZ) referenced in function "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const __thiscall LEVEL_BASE::KNOB<unsigned __int64>::Type(void)" ([email protected][email protected][email protected][email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@XZ) 
inscount0.obj : error LNK2019: unresolved external symbol "public: static __int64 __cdecl LEVEL_BASE::KNOBVALUE<__int64>::FromString(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" ([email protected][email protected][email protected][email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@Z) referenced in function "public: void __thiscall LEVEL_BASE::KNOBVALUE<__int64>::Accumulate(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" ([email protected][email protected][email protected][email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@Z) 
inscount0.obj : error LNK2019: unresolved external symbol "public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const __cdecl LEVEL_BASE::KNOBVALUE<__int64>::Type(void)" ([email protected][email protected][email protected][email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@XZ) referenced in function "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const __thiscall LEVEL_BASE::KNOB<__int64>::Type(void)" ([email protected][email protected][email protected][email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@XZ) 
inscount0.obj : error LNK2019: unresolved external symbol "public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl LEVEL_BASE::KNOBVALUE<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::FromString(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" ([email protected][email protected][email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@[email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@Z) referenced in function "public: void __thiscall LEVEL_BASE::KNOBVALUE<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::Accumulate(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" ([email protected][email protected][email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@[email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@Z) 
inscount0.obj : error LNK2019: unresolved external symbol "public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const __cdecl LEVEL_BASE::KNOBVALUE<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::Type(void)" ([email protected][email protected][email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@[email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@XZ) referenced in function "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const __thiscall LEVEL_BASE::KNOB<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::Type(void)" ([email protected][email protected][email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@[email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@XZ) 
pin.lib(reg.obj) : error LNK2001: unresolved external symbol "public: static void * __cdecl std::__malloc_alloc::allocate(unsigned int)" ([email protected][email protected]@@[email protected]) 
pin.lib(cfg_ia32.obj) : error LNK2001: unresolved external symbol "public: static void * __cdecl std::__malloc_alloc::allocate(unsigned int)" ([email protected][email protected]@@[email protected]) 
pin.lib(ipc_common_windows.obj) : error LNK2001: unresolved external symbol "public: static void * __cdecl std::__malloc_alloc::allocate(unsigned int)" ([email protected][email protected]@@[email protected]) 
pin.lib(ipc_connection_windows.obj) : error LNK2001: unresolved external symbol "public: static void * __cdecl std::__malloc_alloc::allocate(unsigned int)" ([email protected][email protected]@@[email protected]) 
pin.lib(modules_win.obj) : error LNK2001: unresolved external symbol "public: static void * __cdecl std::__malloc_alloc::allocate(unsigned int)" ([email protected][email protected]@@[email protected]) 
pin.lib(elf_windows.obj) : error LNK2019: unresolved external symbol "public: static void * __cdecl std::__malloc_alloc::allocate(unsigned int)" ([email protected][email protected]@@[email protected]) referenced in function "class LEVEL_CORE::INDEX<21> __cdecl LEVEL_CORE::FindLinkerDefinedSymbol(class std::basic_string<char,class std::char_traits<char>,class std::allocator<char> > const &)" ([email protected][email protected]@[email protected][email protected]@[email protected][email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@Z) 

을 나는 "나는 때문에 아래에 언급 된 이유 이 오류가 될 수 발견 디버그 모드에서 Pintool을 빌드하려고합니다 .Visual Studio의 활성 구성을 Release로 업데이트하면 링크 오류가 사라집니다. "

릴리스 모드에서 빌드하려면 다음 플래그를 사용해야합니다 (co mmand 프롬프트)?

+0

'LEVEL_BASE' 클래스가 정의 된 위치를 찾으십시오. – Ajay

+0

LEVEL_BASE는 PIN – kunal

+0

의 네임 스페이스 참조입니다. 구현 된 곳을 의미합니까? 일부 CPP 파일 또는 일부 LIB/DLL? – Ajay

답변

1

나는 아직도 이것이 필요하다고 확신하지는 않지만, 당신은 crinteginS.o와 pintool을 연결하지 않았다고 믿는다. 이 오브젝트 파일을 linkage 명령의 첫 번째 항목으로 추가하십시오.