-2
我實現了影子系統發現here,我已在clientshadowmgr.cpp所有更改,並添加worldlight.cpp/.H到遊戲/客戶端。C++解析外部符號LNK2019和LNK2001
當我構建解決方案,我得到這些錯誤:
1>clientshadowmgr.obj : error LNK2019: unresolved external symbol "public: bool __thiscall CWorldLights::GetBrightestLightSource(class Vector const &,class Vector &,class Vector &)" ([email protected]@@[email protected]@[email protected]@Z) referenced in function "private: void __thiscall CClientShadowMgr::UpdateShadowDirectionFromLocalLightSource(unsigned short)" ([email protected]@@[email protected])
1>clientshadowmgr.obj : error LNK2001: unresolved external symbol "class CWorldLights * g_pWorldLights" ([email protected]@[email protected]@A)
1>.\Release_mod_hl2\\client.dll : fatal error LNK1120: 2 unresolved externals
在worldlight.h:
//-----------------------------------------------------------------------------
// Singleton exposure
//-----------------------------------------------------------------------------
extern CWorldLights *g_pWorldLights;
不知道如何解決這個問題,如果任何人有任何幫助,我將不勝感激它!
請張貼只有[MCVE](http://stackoverflow.com/help/mcve)代碼。 – Ankur