Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/templates/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Templates 链接器错误:正在静态链接项目中生成LNK2019_Templates_C++11_Linker Errors_Msvc12 - Fatal编程技术网

Templates 链接器错误:正在静态链接项目中生成LNK2019

Templates 链接器错误:正在静态链接项目中生成LNK2019,templates,c++11,linker-errors,msvc12,Templates,C++11,Linker Errors,Msvc12,因此,我的团队一直在尝试实现我们自己的共享ptr实现,以便我们能够再次在调试模式(VS2013)下成功测试我们的游戏项目。但是,我们遇到了以下错误列表 10>GameLogic.lib(GameLevel.obj) : error LNK2019: unresolved external symbol "public: __thiscall Handle<class LevelRuleset>::operator bool(void)const " (??B?$Handle@V

因此,我的团队一直在尝试实现我们自己的共享ptr实现,以便我们能够再次在调试模式(VS2013)下成功测试我们的游戏项目。但是,我们遇到了以下错误列表

10>GameLogic.lib(GameLevel.obj) : error LNK2019: unresolved external symbol "public: __thiscall Handle<class LevelRuleset>::operator bool(void)const " (??B?$Handle@VLevelRuleset@@@@QBE_NXZ) referenced in function "public: void __thiscall GameLevel::GameLevelUpdate(float)" (?GameLevelUpdate@GameLevel@@QAEXM@Z)
10>Graphics.lib(AntTweakSys.obj) : error LNK2001: unresolved external symbol "public: __thiscall Handle<class LevelRuleset>::operator bool(void)const " (??B?$Handle@VLevelRuleset@@@@QBE_NXZ)
10>GameLogic.lib(GameLogicBehaviors.obj) : error LNK2019: unresolved external symbol "class Handle<class Component> __cdecl static_handle_cast<class Component,class ScaleBehavior>(class Handle<class ScaleBehavior> const &)" (??$static_handle_cast@VComponent@@VScaleBehavior@@@@YA?AV?$Handle@VComponent@@@@ABV?$Handle@VScaleBehavior@@@@@Z) referenced in function "public: void __thiscall GameLogic::AddGrowShrinkPlayer(unsigned long)" (?AddGrowShrinkPlayer@GameLogic@@QAEXK@Z)
10>Graphics.lib(Graphics.obj) : error LNK2019: unresolved external symbol "public: __thiscall Handle<class Camera>::operator bool(void)const " (??B?$Handle@VCamera@@@@QBE_NXZ) referenced in function "private: void __thiscall GraphicsSystem::LoadGeneratedObjects(void)" (?LoadGeneratedObjects@GraphicsSystem@@AAEXXZ)
10>Graphics.lib(AntTweakSys.obj) : error LNK2001: unresolved external symbol "public: __thiscall Handle<class Camera>::operator bool(void)const " (??B?$Handle@VCamera@@@@QBE_NXZ)
10>Graphics.lib(DX11.obj) : error LNK2001: unresolved external symbol "public: __thiscall Handle<class Camera>::operator bool(void)const " (??B?$Handle@VCamera@@@@QBE_NXZ)
10>Graphics.lib(Graphics.obj) : error LNK2019: unresolved external symbol "public: __thiscall Handle<class Debug>::operator bool(void)const " (??B?$Handle@VDebug@@@@QBE_NXZ) referenced in function "private: void __thiscall GraphicsSystem::LoadGeneratedObjects(void)" (?LoadGeneratedObjects@GraphicsSystem@@AAEXXZ)
10>Graphics.lib(AntTweakSys.obj) : error LNK2001: unresolved external symbol "public: __thiscall Handle<class Debug>::operator bool(void)const " (??B?$Handle@VDebug@@@@QBE_NXZ)
10>Graphics.lib(GFXMessageHandler.obj) : error LNK2001: unresolved external symbol "public: __thiscall Handle<class Debug>::operator bool(void)const " (??B?$Handle@VDebug@@@@QBE_NXZ)
10>Graphics.lib(AntTweakSys.obj) : error LNK2019: unresolved external symbol "public: __thiscall Handle<class Group>::operator bool(void)const " (??B?$Handle@VGroup@@@@QBE_NXZ) referenced in function "private: static void __stdcall AntTweakSystem::AddObjectBar(void *)" (?AddObjectBar@AntTweakSystem@@CGXPAX@Z)
10>Graphics.lib(AntTweakSys.obj) : error LNK2019: unresolved external symbol "public: __thiscall Handle<class RigidBody>::operator bool(void)const " (??B?$Handle@VRigidBody@@@@QBE_NXZ) referenced in function "private: static void __stdcall AntTweakSystem::AddObjectBar(void *)" (?AddObjectBar@AntTweakSystem@@CGXPAX@Z)
10>Graphics.lib(DX11.obj) : error LNK2001: unresolved external symbol "public: __thiscall Handle<class RigidBody>::operator bool(void)const " (??B?$Handle@VRigidBody@@@@QBE_NXZ)
10>Physics.lib(Physics.obj) : error LNK2001: unresolved external symbol "public: __thiscall Handle<class RigidBody>::operator bool(void)const " (??B?$Handle@VRigidBody@@@@QBE_NXZ)
10>Graphics.lib(AntTweakSys.obj) : error LNK2019: unresolved external symbol "public: __thiscall Handle<class Collider>::operator bool(void)const " (??B?$Handle@VCollider@@@@QBE_NXZ) referenced in function "private: static void __stdcall AntTweakSystem::AddObjectBar(void *)" (?AddObjectBar@AntTweakSystem@@CGXPAX@Z)
10>Graphics.lib(DX11.obj) : error LNK2001: unresolved external symbol "public: __thiscall Handle<class Collider>::operator bool(void)const " (??B?$Handle@VCollider@@@@QBE_NXZ)
10>Physics.lib(Physics.obj) : error LNK2001: unresolved external symbol "public: __thiscall Handle<class Collider>::operator bool(void)const " (??B?$Handle@VCollider@@@@QBE_NXZ)
10>Graphics.lib(AntTweakSys.obj) : error LNK2019: unresolved external symbol "public: __thiscall Handle<class Controller>::operator bool(void)const " (??B?$Handle@VController@@@@QBE_NXZ) referenced in function "private: static void __stdcall AntTweakSystem::AddObjectBar(void *)" (?AddObjectBar@AntTweakSystem@@CGXPAX@Z)
10>Graphics.lib(AntTweakSys.obj) : error LNK2019: unresolved external symbol "public: __thiscall Handle<class Spawner>::operator bool(void)const " (??B?$Handle@VSpawner@@@@QBE_NXZ) referenced in function "private: static void __stdcall AntTweakSystem::AddObjectBar(void *)" (?AddObjectBar@AntTweakSystem@@CGXPAX@Z)
10>Graphics.lib(AntTweakSys.obj) : error LNK2019: unresolved external symbol "public: __thiscall Handle<class PlayerStats>::operator bool(void)const " (??B?$Handle@VPlayerStats@@@@QBE_NXZ) referenced in function "private: static void __stdcall AntTweakSystem::AddObjectBar(void *)" (?AddObjectBar@AntTweakSystem@@CGXPAX@Z)
10>Graphics.lib(AntTweakSys.obj) : error LNK2019: unresolved external symbol "public: __thiscall Handle<class Gun>::operator bool(void)const " (??B?$Handle@VGun@@@@QBE_NXZ) referenced in function "private: static void __stdcall AntTweakSystem::AddObjectBar(void *)" (?AddObjectBar@AntTweakSystem@@CGXPAX@Z)
10>Graphics.lib(AntTweakSys.obj) : error LNK2019: unresolved external symbol "public: __thiscall Handle<class Owner>::operator bool(void)const " (??B?$Handle@VOwner@@@@QBE_NXZ) referenced in function "private: static void __stdcall AntTweakSystem::AddObjectBar(void *)" (?AddObjectBar@AntTweakSystem@@CGXPAX@Z)
10>Graphics.lib(AntTweakSys.obj) : error LNK2019: unresolved external symbol "public: __thiscall Handle<class StatModifier>::operator bool(void)const " (??B?$Handle@VStatModifier@@@@QBE_NXZ) referenced in function "private: static void __stdcall AntTweakSystem::AddObjectBar(void *)" (?AddObjectBar@AntTweakSystem@@CGXPAX@Z)
10>Graphics.lib(AntTweakSys.obj) : error LNK2019: unresolved external symbol "public: __thiscall Handle<class LifeTime>::operator bool(void)const " (??B?$Handle@VLifeTime@@@@QBE_NXZ) referenced in function "private: static void __stdcall AntTweakSystem::AddObjectBar(void *)" (?AddObjectBar@AntTweakSystem@@CGXPAX@Z)
10>Input.lib(Input.obj) : error LNK2019: unresolved external symbol _SDL_GetError referenced in function "public: virtual void __thiscall InputSystem::Initialize(void)" (?Initialize@InputSystem@@UAEXXZ)
10>Windows.lib(Windows.obj) : error LNK2001: unresolved external symbol _SDL_GetError
10>Input.lib(Input.obj) : error LNK2019: unresolved external symbol _SDL_PollEvent referenced in function "private: void __thiscall InputSystem::HandleEvents(void)" (?HandleEvents@InputSystem@@AAEXXZ)
10>Input.lib(Input.obj) : error LNK2019: unresolved external symbol _SDL_EventState referenced in function "private: void __thiscall InputSystem::HandleEvents(void)" (?HandleEvents@InputSystem@@AAEXXZ)
10>Input.lib(Input.obj) : error LNK2019: unresolved external symbol _SDL_Init referenced in function "public: virtual void __thiscall InputSystem::Initialize(void)" (?Initialize@InputSystem@@UAEXXZ)
10>Windows.lib(Windows.obj) : error LNK2001: unresolved external symbol _SDL_Init
10>Input.lib(Input.obj) : error LNK2019: unresolved external symbol _SDL_QuitSubSystem referenced in function "public: virtual int __thiscall InputSystem::Release(void)" (?Release@InputSystem@@UAEHXZ)
10>Windows.lib(Windows.obj) : error LNK2001: unresolved external symbol _SDL_QuitSubSystem
10>Input.lib(Input.obj) : error LNK2019: unresolved external symbol "public: __thiscall Handle<class Component>::operator bool(void)const " (??B?$Handle@VComponent@@@@QBE_NXZ) referenced in function "private: void __thiscall InputSystem::HandleMessage(void)" (?HandleMessage@InputSystem@@AAEXXZ)
10>Windows.lib(Windows.obj) : error LNK2019: unresolved external symbol _SDL_RWFromFile referenced in function "public: virtual void __thiscall WindowSystem::Initialize(void)" (?Initialize@WindowSystem@@UAEXXZ)
10>Windows.lib(Windows.obj) : error LNK2019: unresolved external symbol _SDL_MapRGB referenced in function "public: virtual void __thiscall WindowSystem::Initialize(void)" (?Initialize@WindowSystem@@UAEXXZ)
10>Windows.lib(Windows.obj) : error LNK2019: unresolved external symbol _SDL_FreeSurface referenced in function "public: virtual void __thiscall WindowSystem::Initialize(void)" (?Initialize@WindowSystem@@UAEXXZ)
10>Windows.lib(Windows.obj) : error LNK2019: unresolved external symbol _SDL_LoadBMP_RW referenced in function "public: virtual void __thiscall WindowSystem::Initialize(void)" (?Initialize@WindowSystem@@UAEXXZ)
10>Windows.lib(Windows.obj) : error LNK2019: unresolved external symbol _SDL_FillRect referenced in function "public: virtual void __thiscall WindowSystem::Initialize(void)" (?Initialize@WindowSystem@@UAEXXZ)
10>Windows.lib(Windows.obj) : error LNK2019: unresolved external symbol _SDL_CreateWindow referenced in function "public: virtual void __thiscall WindowSystem::Initialize(void)" (?Initialize@WindowSystem@@UAEXXZ)
10>Windows.lib(Windows.obj) : error LNK2019: unresolved external symbol _SDL_SetWindowIcon referenced in function "public: virtual void __thiscall WindowSystem::Initialize(void)" (?Initialize@WindowSystem@@UAEXXZ)
10>Windows.lib(Windows.obj) : error LNK2019: unresolved external symbol _SDL_GetWindowSize referenced in function "public: virtual void __thiscall WindowSystem::TransmitMessage(class std::shared_ptr<class Message>)" (?TransmitMessage@WindowSystem@@UAEXV?$shared_ptr@VMessage@@@std@@@Z)
10>Windows.lib(Windows.obj) : error LNK2019: unresolved external symbol _SDL_MinimizeWindow referenced in function "public: virtual void __thiscall WindowSystem::TransmitMessage(class std::shared_ptr<class Message>)" (?TransmitMessage@WindowSystem@@UAEXV?$shared_ptr@VMessage@@@std@@@Z)
10>Windows.lib(Windows.obj) : error LNK2019: unresolved external symbol _SDL_GetWindowSurface referenced in function "public: virtual void __thiscall WindowSystem::Initialize(void)" (?Initialize@WindowSystem@@UAEXXZ)
10>Windows.lib(Windows.obj) : error LNK2019: unresolved external symbol _SDL_DestroyWindow referenced in function "public: virtual int __thiscall WindowSystem::Release(void)" (?Release@WindowSystem@@UAEHXZ)
10>Windows.lib(Windows.obj) : error LNK2019: unresolved external symbol _SDL_ShowSimpleMessageBox referenced in function "private: void __thiscall WindowSystem::ErrorPopUp(class std::shared_ptr<class ErrorMessage> const &)" (?ErrorPopUp@WindowSystem@@AAEXABV?$shared_ptr@VErrorMessage@@@std@@@Z)
10>A:\Mercurial\CodeFish\Build\AntTweakDebugWin32\Game.exe : fatal error LNK1120: 32 unresolved externals
10>GameLogic.lib(GameLevel.obj):错误LNK2019:未解析的外部符号“public:u thiscall Handle::operator bool(void)const”(?B$Handle@VLevelRuleset@@@@函数“public:void u thiscall GameLevel::GameLevelUpdate(float)”中引用了QBE_NXZ)(?GameLevelUpdate@GameLevel@@QAEXM@Z)
10> Graphics.lib(AntTweakSys.obj):错误LNK2001:未解析的外部符号“public:u thiscall Handle::operator bool(void)const”(?B$Handle@VLevelRuleset@@@@QBE_NXZ)
10> GameLogic.lib(GameLogicBehaviors.obj):错误LNK2019:未解析的外部符号“类句柄\uu cdecl静态\u句柄\u强制转换(类句柄常量)(?$static\u句柄_cast@VComponent@@Vscaleya?AV$Handle@VComponent@@@@ABV$Handle@VScaleBehavior@@@@@Z) 在函数“public:void\u thiscall GameLogic::AddGrowShrinkPlayer”中引用(无符号长“)(?AddGrowShrinkPlayer@GameLogic@@QAEXK@Z)
10> Graphics.lib(Graphics.obj):错误LNK2019:未解析的外部符号“public:u thiscall Handle::operator bool(void)const”(?B$Handle@VCamera@@@@QBE_NXZ)在函数“private:void _thiscallgraphicssystem::LoadGeneratedObjects(void)”中引用(?LoadGeneratedObjects@GraphicsSystem@@AAEXXZ)
10> Graphics.lib(AntTweakSys.obj):错误LNK2001:未解析的外部符号“public:u thiscall Handle::operator bool(void)const”(?B$Handle@VCamera@@@@QBE_NXZ)
10> Graphics.lib(DX11.obj):错误LNK2001:未解析的外部符号“public:u thiscall Handle::operator bool(void)const”(?B$Handle@VCamera@@@@QBE_NXZ)
10> Graphics.lib(Graphics.obj):错误LNK2019:未解析的外部符号“public:u thiscall Handle::operator bool(void)const”(?B$Handle@VDebug@@@@QBE_NXZ)在函数“private:void _thiscallgraphicssystem::LoadGeneratedObjects(void)”中引用(?LoadGeneratedObjects@GraphicsSystem@@AAEXXZ)
10> Graphics.lib(AntTweakSys.obj):错误LNK2001:未解析的外部符号“public:u thiscall Handle::operator bool(void)const”(?B$Handle@VDebug@@@@QBE_NXZ)
10> Graphics.lib(GFXMessageHandler.obj):错误LNK2001:未解析的外部符号“public:u thiscall Handle::operator bool(void)const”(?B$Handle@VDebug@@@@QBE_NXZ)
10> Graphics.lib(AntTweakSys.obj):错误LNK2019:未解析的外部符号“public:u thiscall Handle::operator bool(void)const”(?B$Handle@VGroup@@@@函数“private:static void u stdcall AntTweakSystem::AddObjectBar(void*)”中引用了QBE_NXZ)(?AddObjectBar@AntTweakSystem@@CGXPAX@Z)
10> Graphics.lib(AntTweakSys.obj):错误LNK2019:未解析的外部符号“public:u thiscall Handle::operator bool(void)const”(?B$Handle@VRigidBody@@@@函数“private:static void u stdcall AntTweakSystem::AddObjectBar(void*)”中引用了QBE_NXZ)(?AddObjectBar@AntTweakSystem@@CGXPAX@Z)
10> Graphics.lib(DX11.obj):错误LNK2001:未解析的外部符号“public:u thiscall Handle::operator bool(void)const”(?B$Handle@VRigidBody@@@@QBE_NXZ)
10> Physics.lib(Physics.obj):错误LNK2001:未解析的外部符号“public:u thiscall Handle::operator bool(void)const”(?B$Handle@VRigidBody@@@@QBE_NXZ)
10> Graphics.lib(AntTweakSys.obj):错误LNK2019:未解析的外部符号“public:u thiscall Handle::operator bool(void)const”(?B$Handle@VCollider@@@@函数“private:static void u stdcall AntTweakSystem::AddObjectBar(void*)”中引用了QBE_NXZ)(?AddObjectBar@AntTweakSystem@@CGXPAX@Z)
10> Graphics.lib(DX11.obj):错误LNK2001:未解析的外部符号“public:u thiscall Handle::operator bool(void)const”(?B$Handle@VCollider@@@@QBE_NXZ)
10> Physics.lib(Physics.obj):错误LNK2001:未解析的外部符号“public:u thiscall Handle::operator bool(void)const”(?B$Handle@VCollider@@@@QBE_NXZ)
10> Graphics.lib(AntTweakSys.obj):错误LNK2019:未解析的外部符号“public:u thiscall Handle::operator bool(void)const”(?B$Handle@VController@@@@函数“private:static void u stdcall AntTweakSystem::AddObjectBar(void*)”中引用了QBE_NXZ)(?AddObjectBar@AntTweakSystem@@CGXPAX@Z)
10> Graphics.lib(AntTweakSys.obj):错误LNK2019:未解析的外部符号“public:u thiscall Handle::operator bool(void)const”(?B$Handle@VSpawner@@@@函数“private:static void u stdcall AntTweakSystem::AddObjectBar(void*)”中引用了QBE_NXZ)(?AddObjectBar@AntTweakSystem@@CGXPAX@Z)
10> Graphics.lib(AntTweakSys.obj):错误LNK2019:未解析的外部符号“public:u thiscall Handle::operator bool(void)const”(?B$Handle@VPlayerStats@@@@函数“private:static void u stdcall AntTweakSystem::AddObjectBar(void*)”中引用了QBE_NXZ)(?AddObjectBar@AntTweakSystem@@CGXPAX@Z)
10> Graphics.lib(AntTweakSys.obj):错误LNK2019:未解析的外部符号“public:u thiscall Handle::operator bool(void)const”(?B$Handle@VGun@@@@函数“private:static void u stdcall AntTweakSystem::AddObjectBar(void*)”中引用了QBE_NXZ)(?AddObjectBar@AntTweakSystem@@CGXPAX@Z)
10> Graphics.lib(AntTweakSys.obj):错误LNK2019:未解析的外部符号“public:u thiscall Handle::operator bool(void)const”(?B$Handle@VOwner@@@@函数“private:static void u stdcall AntTweakSystem::AddObjectBar(void*)”中引用了QBE_NXZ)(?AddObjectBar@AntTweakSystem@@CGXPAX@Z)
10> Graphics.lib(AntTweakSys.obj):错误LNK2019:未解析的外部符号“public:u thiscall Handle::operator bool(void)const”(?B$Handle@VStatModifier@@@@函数“private:static void u stdcall AntTweakSystem::AddObjectBar(void*)”中引用了QBE_NXZ)(?AddObjectBar@AntTweakSystem@@CGXPAX@Z)
10> Graphics.lib(AntTweakSys.obj):错误LNK2019:未解析的外部符号“public:u thiscall Handle::operator bool(void)const”(?B$Handle@VLifeTime@@@@QBE_NXZ)在函数“private:static void\u stdcall AntTweakSystem::Ad”中引用
template <class TYPE>
class Handle;

template <class TYPE_TO_CAST_TO, class TYPE_TO_CAST_FROM>
Handle<TYPE_TO_CAST_TO> static_handle_cast(Handle<TYPE_TO_CAST_FROM> const& subject);

template <class TYPE>
class Handle : public HandleRegistrar
{
  // friend all Handles so that we may convert them
  template<class U> friend class Handle;
  template<class T, class U> friend Handle<T> static_handle_cast(Handle<U> const& subject);

  private:
    bool m_weak;
    int* m_ref_count;
    TYPE** m_ptr;

  public:
    void destruct(void);
    int use_count(void) const;
    bool expired(void) const;
    void swap(Handle<TYPE>& rhs);
    TYPE* get(void);
    TYPE* get(void) const;
    template<typename TYPE2> Handle<TYPE>& operator=(const Handle<TYPE2>& rhs);
    Handle<TYPE>& operator=(const Handle<TYPE>& rhs);
    template<typename TYPE2> Handle<TYPE>& operator=(TYPE2* rhs);
    TYPE* operator->(void);
    TYPE* operator->(void) const;
    TYPE& operator*(void);
    TYPE& operator*(void) const;
    bool operator==(const Handle<TYPE>& rhs);
    void operator%(Handle<TYPE>& rhs);
    operator bool(void) const;

  public:
    ~Handle(void);
    Handle(const Handle<TYPE>& rhs, bool weak = false);
    template<typename TYPE2> Handle(const Handle<TYPE2>& rhs, bool weak = false);
    Handle(TYPE& object_to_point_at, bool weak = false);
    Handle(TYPE*&& pointer_to_object, bool weak = false);
    Handle(void);
 };