在vc 2010设置_STL70_

在 vc2010中安装wdk后,如果包含wdk里面的stl70:

Include路径设置
/I"C:\WinDDK\7600.16385.1\inc\crt"
/I"C:\WinDDK\7600.16385.1\inc\api\crt\stl70"
/I"C:\WinDDK\7600.16385.1\inc\api"

定义
/D "_STL70_"
/D "_STATIC_CPPLIB"

链接
ntstc_msvcrt.lib

设置错误时,会出现类似链接错误:
1>ex01_2.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl std::_Debug_message(char const *,char const *)" (__imp_?_Debug_message@std@@YAXPBD0@Z) referenced in function "public: void __thiscall std::_Iterator_base::_Orphan_me(void)" (?_Orphan_me@_Iterator_base@std@@QAEXXZ)
1>ex20_4.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) void __cdecl std::_Debug_message(char const *,char const *)" (__imp_?_Debug_message@std@@YAXPBD0@Z)
1>ex01_2.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::~_Container_base(void)" (__imp_??1_Container_base@std@@QAE@XZ) referenced in function "public: __thiscall std::_Tmap_traits<unsigned long,struct NT::_SYSTEM_OBJECT_TYPE_INFORMATION *,struct std::less<unsigned long>,class std::allocator<struct std::pair<unsigned long const ,struct NT::_SYSTEM_OBJECT_TYPE_INFORMATION *> >,0>::~_Tmap_traits<unsigned long,struct NT::_SYSTEM_OBJECT_TYPE_INFORMATION *,struct std::less<unsigned long>,class std::allocator<struct std::pair<unsigned long const ,struct NT::_SYSTEM_OBJECT_TYPE_INFORMATION *> >,0>(void)" (??1?$_Tmap_traits@KPAU_SYSTEM_OBJECT_TYPE_INFORMATION@NT@@U?$less@K@std@@V?$allocator@U?$pair@$$CBKPAU_SYSTEM_OBJECT_TYPE_INFORMATION@NT@@@std@@@4@$0A@@std@@QAE@XZ)
1>ex20_4.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::~_Container_base(void)" (__imp_??1_Container_base@std@@QAE@XZ)
1>ex01_2.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char>,class _STL70>::~basic_string<char,struct std::char_traits<char>,class std::allocator<char>,class _STL70>(void)" (__imp_??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@V_STL70@@@std@@QAE@XZ) referenced in function "protected: class std::_Tree<class std::_Tmap_traits<unsigned long,struct NT::_SYSTEM_OBJECT_TYPE_INFORMATION *,struct std::less<unsigned long>,class std::allocator<struct std::pair<unsigned long const ,struct NT::_SYSTEM_OBJECT_TYPE_INFORMATION *> >,0> >::iterator __thiscall std::_Tree<class std::_Tmap_traits<unsigned long,struct NT::_SYSTEM_OBJECT_TYPE_INFORMATION *,struct std::less<unsigned long>,class std::allocator<struct std::pair<unsigned long const ,struct NT::_SYSTEM_OBJECT_TYPE_INFORMATION *> >,0> >::_Insert(bool,struct std::_Tree_nod<class std::_Tmap_traits<unsigned long,struct NT::_SYSTEM_OBJECT_TYPE_INFORMATION *,struct std::less<unsigned long>,class std::allocator<struct std::pair<unsigned long const ,struct NT::_SYSTEM_OBJECT_TYPE_INFORMATION *> >,0> >::_Node *,struct std::pair<unsigned long const ,struct NT::_SYSTEM_OBJECT_TYPE_INFORMATION *> const &)" (?_Insert@?$_Tree@V?$_Tmap_traits@KPAU_SYSTEM_OBJECT_TYPE_INFORMATION@NT@@U?$less@K@std@@V?$allocator@U?$pair@$$CBKPAU_SYSTEM_OBJECT_TYPE_INFORMATION@NT@@@std@@@4@$0A@@std@@@std@@IAE?AViterator@12@_NPAU_Node@?$_Tree_nod@V?$_Tmap_traits@KPAU_SYSTEM_OBJECT_TYPE_INFORMATION@NT@@U?$less@K@std@@V?$allocator@U?$pair@$$CBKPAU_SYSTEM_OBJECT_TYPE_INFORMATION@NT@@@std@@@4@$0A@@std@@@2@ABU?$pair@$$CBKPAU_SYSTEM_OBJECT_TYPE_INFORMATION@NT@@@2@@Z)
1>ex20_4.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char>,class _STL70>::~basic_string<char,struct std::char_traits<char>,class std::allocator<char>,class _STL70>(void)" (__imp_??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@V_STL70@@@std@@QAE@XZ)
1>ex01_2.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char>,class _STL70>::basic_string<char,struct std::char_traits<char>,class std::allocator<char>,class _STL70>(char const *)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@V_STL70@@@std@@QAE@PBD@Z) referenced in function "protected: class std::_Tree<class std::_Tmap_traits<unsigned long,struct NT::_SYSTEM_OBJECT_TYPE_INFORMATION *,struct std::less<unsigned long>,class std::allocator<struct std::pair<unsigned long const ,struct NT::_SYSTEM_OBJECT_TYPE_INFORMATION *> >,0> >::iterator __thiscall std::_Tree<class std::_Tmap_traits<unsigned long,struct NT::_SYSTEM_OBJECT_TYPE_INFORMATION *,struct std::less<unsigned long>,class std::allocator<struct std::pair<unsigned long const ,struct NT::_SYSTEM_OBJECT_TYPE_INFORMATION *> >,0> >::_Insert(bool,struct std::_Tree_nod<class std::_Tmap_traits<unsigned long,struct NT::_SYSTEM_OBJECT_TYPE_INFORMATION *,struct std::less<unsigned long>,class std::allocator<struct std::pair<unsigned long const ,struct NT::_SYSTEM_OBJECT_TYPE_INFORMATION *> >,0> >::_Node *,struct std::pair<unsigned long const ,struct NT::_SYSTEM_OBJECT_TYPE_INFORMATION *> const &)" (?_Insert@?$_Tree@V?$_Tmap_traits@KPAU_SYSTEM_OBJECT_TYPE_INFORMATION@NT@@U?$less@K@std@@V?$allocator@U?$pair@$$CBKPAU_SYSTEM_OBJECT_TYPE_INFORMATION@NT@@@std@@@4@$0A@@std@@@std@@IAE?AViterator@12@_NPAU_Node@?$_Tree_nod@V?$_Tmap_traits@KPAU_SYSTEM_OBJECT_TYPE_INFORMATION@NT@@U?$less@K@std@@V?$allocator@U?$pair@$$CBKPAU_SYSTEM_OBJECT_TYPE_INFORMATION@NT@@@std@@@4@$0A@@std@@@2@ABU?$pair@$$CBKPAU_SYSTEM_OBJECT_TYPE_INFORMATION@NT@@@2@@Z)
1>ex20_4.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char>,class _STL70>::basic_string<char,struct std::char_traits<char>,class std::allocator<char>,class _STL70>(char const *)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@V_STL70@@@std@@QAE@PBD@Z)
1>ex01_2.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char>,class _STL70>::basic_string<char,struct std::char_traits<char>,class std::allocator<char>,class _STL70>(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char>,class _STL70> const &)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@V_STL70@@@std@@QAE@ABV01@@Z) referenced in function "public: __thiscall std::logic_error::logic_error(class std::logic_error const &)" (??0logic_error@std@@QAE@ABV01@@Z)
1>ex20_4.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char>,class _STL70>::basic_string<char,struct std::char_traits<char>,class std::allocator<char>,class _STL70>(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char>,class _STL70> const &)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@V_STL70@@@std@@QAE@ABV01@@Z)
1>ex01_2.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char>,class _STL70>::c_str(void)const " (__imp_?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@V_STL70@@@std@@QBEPBDXZ) referenced in function "public: virtual char const * __thiscall std::logic_error::what(void)const " (?what@logic_error@std@@UBEPBDXZ)
1>ex20_4.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char>,class _STL70>::c_str(void)const " (__imp_?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@V_STL70@@@std@@QBEPBDXZ)
1>ex01_2.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base@std@@QBEXXZ) referenced in function "public: void __thiscall std::_Tree<class std::_Tmap_traits<unsigned long,struct NT::_SYSTEM_OBJECT_TYPE_INFORMATION *,struct std::less<unsigned long>,class std::allocator<struct std::pair<unsigned long const ,struct NT::_SYSTEM_OBJECT_TYPE_INFORMATION *> >,0> >::clear(void)" (?clear@?$_Tree@V?$_Tmap_traits@KPAU_SYSTEM_OBJECT_TYPE_INFORMATION@NT@@U?$less@K@std@@V?$allocator@U?$pair@$$CBKPAU_SYSTEM_OBJECT_TYPE_INFORMATION@NT@@@std@@@4@$0A@@std@@@std@@QAEXXZ)
1>ex20_4.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base@std@@QBEXXZ)
1>ex01_2.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::_Container_base(void)" (__imp_??0_Container_base@std@@QAE@XZ) referenced in function "public: __thiscall std::_Tmap_traits<unsigned long,struct NT::_SYSTEM_OBJECT_TYPE_INFORMATION *,struct std::less<unsigned long>,class std::allocator<struct std::pair<unsigned long const ,struct NT::_SYSTEM_OBJECT_TYPE_INFORMATION *> >,0>::_Tmap_traits<unsigned long,struct NT::_SYSTEM_OBJECT_TYPE_INFORMATION *,struct std::less<unsigned long>,class std::allocator<struct std::pair<unsigned long const ,struct NT::_SYSTEM_OBJECT_TYPE_INFORMATION *> >,0>(struct std::less<unsigned long>)" (??0?$_Tmap_traits@KPAU_SYSTEM_OBJECT_TYPE_INFORMATION@NT@@U?$less@K@std@@V?$allocator@U?$pair@$$CBKPAU_SYSTEM_OBJECT_TYPE_INFORMATION@NT@@@std@@@4@$0A@@std@@QAE@U?$less@K@1@@Z)
1>ex20_4.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::_Container_base(void)" (__imp_??0_Container_base@std@@QAE@XZ)

你可能感兴趣的:(vc2010,cpplib,stl70)