microsoft / DirectX-Graphics-Samples

This repo contains the DirectX Graphics samples that demonstrate how to build graphics intensive applications on Windows.
MIT License
5.89k stars 2k forks source link

vs2022 compilation failure #786

Closed tsxy2007 closed 1 year ago

tsxy2007 commented 2 years ago

1>ForwardPlusLighting.obj : error LNK2019: 无法解析的外部符号 "unsigned int64 cdecl Graphics::GetFrameCount(void)" (?GetFrameCount@Graphics@@YA_KXZ),函数 "void cdecl Lighting::FillLightGrid(class GraphicsContext &,class Math::Camera const &)" (?FillLightGrid@Lighting@@YAXAEAVGraphicsContext@@AEBVCamera@Math@@@Z) 中引用了该符号 1>Core.lib(EngineProfiling.obj) : error LNK2001: 无法解析的外部符号 "unsigned int64 cdecl Graphics::GetFrameCount(void)" (?GetFrameCount@Graphics@@YA_KXZ) 1>ModelViewer.obj : error LNK2019: 无法解析的外部符号 "bool __cdecl CommandLineArgs::GetInteger(wchar_t const *,unsigned int &)" (?GetInteger@CommandLineArgs@@YA_NPEB_WAEAI@Z),函数 "public: virtual void cdecl ModelViewer::Startup(void)" (?Startup@ModelViewer@@UEAAXXZ) 中引用了该符号 1>Core.lib(GraphicsCore.obj) : error LNK2001: 无法解析的外部符号 "bool cdecl CommandLineArgs::GetInteger(wchar_t const ,unsigned int &)" (?GetInteger@CommandLineArgs@@YA_NPEB_WAEAI@Z) 1>ModelViewer.obj : error LNK2019: 无法解析的外部符号 "bool __cdecl CommandLineArgs::GetString(wchar_t const ,class std::basic_string<wchar_t,struct std::char_traits,class std::allocator > &)" (?GetString@CommandLineArgs@@YA_NPEB_WAEAV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@Z),函数 "public: virtual void cdecl ModelViewer::Startup(void)" (?Startup@ModelViewer@@UEAAXXZ) 中引用了该符号 1>Core.lib(GraphicsCore.obj) : error LNK2001: 无法解析的外部符号 "bool cdecl CommandLineArgs::GetString(wchar_t const *,class std::basic_string<wchar_t,struct std::char_traits,class std::allocator > &)" (?GetString@CommandLineArgs@@YA_NPEB_WAEAV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@Z) 1>ModelViewer.obj : error LNK2019: 无法解析的外部符号 "void cdecl Sponza::Startup(class Math::Camera &)" (?Startup@Sponza@@YAXAEAVCamera@Math@@@Z),函数 "public: virtual void cdecl ModelViewer::Startup(void)" (?Startup@ModelViewer@@UEAAXXZ) 中引用了该符号 1>ModelViewer.obj : error LNK2019: 无法解析的外部符号 "void cdecl Sponza::Cleanup(void)" (?Cleanup@Sponza@@YAXXZ),函数 "public: virtual void cdecl ModelViewer::Cleanup(void)" (?Cleanup@ModelViewer@@UEAAXXZ) 中引用了该符号 1>ModelViewer.obj : error LNK2019: 无法解析的外部符号 "void __cdecl Sponza::RenderScene(class GraphicsContext &,class Math::Camera const &,struct D3D12_VIEWPORT const &,struct tagRECT const &,bool,bool)" (?RenderScene@Sponza@@YAXAEAVGraphicsContext@@AEBVCamera@Math@@AEBUD3D12_VIEWPORT@@AEBUtagRECT@@_N4@Z),函数 "public: virtual void cdecl ModelViewer::RenderScene(void)" (?RenderScene@ModelViewer@@UEAAXXZ) 中引用了该符号 1>ModelViewer.obj : error LNK2019: 无法解析的外部符号 "void cdecl Renderer::Initialize(void)" (?Initialize@Renderer@@YAXXZ),函数 "public: virtual void cdecl ModelViewer::Startup(void)" (?Startup@ModelViewer@@UEAAXXZ) 中引用了该符号 1>ModelViewer.obj : error LNK2019: 无法解析的外部符号 "void cdecl Renderer::Shutdown(void)" (?Shutdown@Renderer@@YAXXZ),函数 "public: virtual void cdecl ModelViewer::Cleanup(void)" (?Cleanup@ModelViewer@@UEAAXXZ) 中引用了该符号 1>ModelViewer.obj : error LNK2019: 无法解析的外部符号 "void cdecl Renderer::SetIBLTextures(class TextureRef,class TextureRef)" (?SetIBLTextures@Renderer@@YAXVTextureRef@@0@Z),函数 "void cdecl ChangeIBLSet(enum EngineVar::ActionType)" (?ChangeIBLSet@@YAXW4ActionType@EngineVar@@@Z) 中引用了该符号 1>ModelViewer.obj : error LNK2019: 无法解析的外部符号 "void cdecl Renderer::SetIBLBias(float)" (?SetIBLBias@Renderer@@YAXM@Z),函数 "void cdecl ChangeIBLBias(enum EngineVar::ActionType)" (?ChangeIBLBias@@YAXW4ActionType@EngineVar@@@Z) 中引用了该符号 1>ModelViewer.obj : error LNK2019: 无法解析的外部符号 "void cdecl Renderer::DrawSkybox(class GraphicsContext &,class Math::Camera const &,struct D3D12_VIEWPORT const &,struct tagRECT const &)" (?DrawSkybox@Renderer@@YAXAEAVGraphicsContext@@AEBVCamera@Math@@AEBUD3D12_VIEWPORT@@AEBUtagRECT@@@Z),函数 "public: virtual void cdecl ModelViewer::RenderScene(void)" (?RenderScene@ModelViewer@@UEAAXXZ) 中引用了该符号 1>ModelViewer.obj : error LNK2019: 无法解析的外部符号 "public: void cdecl Renderer::MeshSorter::Sort(void)" (?Sort@MeshSorter@Renderer@@QEAAXXZ),函数 "public: virtual void cdecl ModelViewer::RenderScene(void)" (?RenderScene@ModelViewer@@UEAAXXZ) 中引用了该符号 1>ModelViewer.obj : error LNK2019: 无法解析的外部符号 "public: void cdecl Renderer::MeshSorter::RenderMeshes(enum Renderer::MeshSorter::DrawPass,class GraphicsContext &,struct GlobalConstants &)" (?RenderMeshes@MeshSorter@Renderer@@QEAAXW4DrawPass@12@AEAVGraphicsContext@@AEAUGlobalConstants@@@Z),函数 "public: virtual void cdecl ModelViewer::RenderScene(void)" (?RenderScene@ModelViewer@@UEAAXXZ) 中引用了该符号 1>ModelViewer.obj : error LNK2019: 无法解析的外部符号 "public: void cdecl ModelInstance::LoopAllAnimations(void)" (?LoopAllAnimations@ModelInstance@@QEAAXXZ),函数 "public: virtual void cdecl ModelViewer::Startup(void)" (?Startup@ModelViewer@@UEAAXXZ) 中引用了该符号 1>ModelViewer.obj : error LNK2019: 无法解析的外部符号 "class std::shared_ptr cdecl Renderer::LoadModel(class std::basic_string<wchar_t,struct std::char_traits,class std::allocator > const &,bool)" (?LoadModel@Renderer@@YA?AV?$shared_ptr@VModel@@@std@@AEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@3@_N@Z),函数 "public: virtual void cdecl ModelViewer::Startup(void)" (?Startup@ModelViewer@@UEAAXXZ) 中引用了该符号 1>ModelViewer.obj : error LNK2019: 无法解析的外部符号 "float cdecl Graphics::GetFrameTime(void)" (?GetFrameTime@Graphics@@YAMXZ),函数 "public: virtual void cdecl ModelViewer::RenderScene(void)" (?RenderScene@ModelViewer@@UEAAXXZ) 中引用了该符号 1>Core.lib(GameCore.obj) : error LNK2001: 无法解析的外部符号 "float cdecl Graphics::GetFrameTime(void)" (?GetFrameTime@Graphics@@YAMXZ) 1>ModelViewer.obj : error LNK2001: 无法解析的外部符号 "class EnumVar Graphics::DebugZoom" (?DebugZoom@Graphics@@3VEnumVar@@A) 1>Core.lib(CameraController.obj) : error LNK2001: 无法解析的外部符号 "class EnumVar Graphics::DebugZoom" (?DebugZoom@Graphics@@3VEnumVar@@A) 1>Core.lib(EngineTuning.obj) : error LNK2001: 无法解析的外部符号 "unsigned int Graphics::g_DisplayWidth" (?g_DisplayWidth@Graphics@@3IA) 1>Core.lib(EngineProfiling.obj) : error LNK2001: 无法解析的外部符号 "unsigned int Graphics::g_DisplayWidth" (?g_DisplayWidth@Graphics@@3IA) 1>Core.lib(BufferManager.obj) : error LNK2001: 无法解析的外部符号 "unsigned int Graphics::g_DisplayWidth" (?g_DisplayWidth@Graphics@@3IA) 1>Core.lib(GameCore.obj) : error LNK2001: 无法解析的外部符号 "unsigned int Graphics::g_DisplayWidth" (?g_DisplayWidth@Graphics@@3IA) 1>Core.lib(EngineTuning.obj) : error LNK2001: 无法解析的外部符号 "unsigned int Graphics::g_DisplayHeight" (?g_DisplayHeight@Graphics@@3IA) 1>Core.lib(EngineProfiling.obj) : error LNK2001: 无法解析的外部符号 "unsigned int Graphics::g_DisplayHeight" (?g_DisplayHeight@Graphics@@3IA) 1>Core.lib(BufferManager.obj) : error LNK2001: 无法解析的外部符号 "unsigned int Graphics::g_DisplayHeight" (?g_DisplayHeight@Graphics@@3IA) 1>Core.lib(GameCore.obj) : error LNK2001: 无法解析的外部符号 "unsigned int Graphics::g_DisplayHeight" (?g_DisplayHeight@Graphics@@3IA) 1>Core.lib(GameCore.obj) : error LNK2019: 无法解析的外部符号 "void cdecl CommandLineArgs::Initialize(int,wchar_t )" (?Initialize@CommandLineArgs@@YAXHPEAPEA_W@Z),函数 "void cdecl GameCore::InitializeApplication(class GameCore::IGameApp &)" (?InitializeApplication@GameCore@@YAXAEAVIGameApp@1@@Z) 中引用了该符号 1>Core.lib(GameCore.obj) : error LNK2019: 无法解析的外部符号 "void cdecl Display::Resize(unsigned int,unsigned int)" (?Resize@Display@@YAXII@Z),函数 "int64 cdecl GameCore::WndProc(struct HWND *,unsigned int,unsigned int64,int64)" (?WndProc@GameCore@@YA_JPEAUHWND@@I_K_J@Z) 中引用了该符号 1>Core.lib(GameCore.obj) : error LNK2019: 无法解析的外部符号 "void cdecl Display::Present(void)" (?Present@Display@@YAXXZ),函数 "bool cdecl GameCore::UpdateApplication(class GameCore::IGameApp &)" (?UpdateApplication@GameCore@@YA_NAEAVIGameApp@1@@Z) 中引用了该符号 1>Core.lib(PostEffects.obj) : error LNK2001: 无法解析的外部符号 "bool Graphics::g_bEnableHDROutput" (?g_bEnableHDROutput@Graphics@@3_NA) 1>Core.lib(PostEffects.obj) : error LNK2001: 无法解析的外部符号 "class NumVar Graphics::g_HDRPaperWhite" (?g_HDRPaperWhite@Graphics@@3VNumVar@@A) 1>Core.lib(PostEffects.obj) : error LNK2001: 无法解析的外部符号 "class NumVar Graphics::g_MaxDisplayLuminance" (?g_MaxDisplayLuminance@Graphics@@3VNumVar@@A) 1>Core.lib(TextRenderer.obj) : error LNK2019: 无法解析的外部符号 "public: void cdecl Texture::Create2D(unsigned int64,unsigned int64,unsigned __int64,enum DXGI_FORMAT,void const *)" (?Create2D@Texture@@QEAAX_K00W4DXGI_FORMAT@@PEBX@Z),函数 "public: void cdecl TextRenderer::Font::LoadFromBinary(wchar_t const ,unsigned char const ,unsigned int64)" (?LoadFromBinary@Font@TextRenderer@@QEAAXPEB_WPEBE_K@Z) 中引用了该符号 1>Core.lib(GraphicsCommon.obj) : error LNK2001: 无法解析的外部符号 "public: void cdecl Texture::Create2D(unsigned int64,unsigned int64,unsigned int64,enum DXGI_FORMAT,void const *)" (?Create2D@Texture@@QEAAX_K00W4DXGI_FORMAT@@PEBX@Z) 1>Core.lib(GraphicsCore.obj) : error LNK2019: 无法解析的外部符号 CreateDXGIFactory2,函数 "void __cdecl Graphics::Initialize(bool)" (?Initialize@Graphics@@YAX_N@Z) 中引用了该符号 1>Core.lib(GraphicsCore.obj) : error LNK2019: 无法解析的外部符号 DXGIGetDebugInterface1,函数 "void cdecl Graphics::Initialize(bool)" (?Initialize@Graphics@@YAX_N@Z) 中引用了该符号 1>Core.lib(GraphicsCore.obj) : error LNK2019: 无法解析的外部符号 "void cdecl Display::Initialize(void)" (?Initialize@Display@@YAXXZ),函数 "void cdecl Graphics::Initialize(bool)" (?Initialize@Graphics@@YAX_N@Z) 中引用了该符号 1>Core.lib(GraphicsCore.obj) : error LNK2019: 无法解析的外部符号 "void cdecl Display::Shutdown(void)" (?Shutdown@Display@@YAXXZ),函数 "void cdecl Graphics::Shutdown(void)" (?Shutdown@Graphics@@YAXXZ) 中引用了该符号 1>Core.lib(GraphicsCommon.obj) : error LNK2019: 无法解析的外部符号 "public: void cdecl Texture::CreateCube(unsigned int64,unsigned int64,unsigned int64,enum DXGI_FORMAT,void const )" (?CreateCube@Texture@@QEAAX_K00W4DXGI_FORMAT@@PEBX@Z),函数 "void cdecl Graphics::InitializeCommonState(void)" (?InitializeCommonState@Graphics@@YAXXZ) 中引用了该符号 1>Model.lib(Model.obj) : error LNK2019: 无法解析的外部符号 "public: void cdecl UploadBuffer::Create(class std::basic_string<wchar_t,struct std::char_traits,class std::allocator > const &,unsigned int64)" (?Create@UploadBuffer@@QEAAXAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@_K@Z),函数 "public: cdecl ModelInstance::ModelInstance(class std::shared_ptr)" (??0ModelInstance@@QEAA@V?$shared_ptr@$$CBVModel@@@std@@@Z) 中引用了该符号 1>Model.lib(Model.obj) : error LNK2019: 无法解析的外部符号 "public: void cdecl UploadBuffer::Map(void)" (?Map@UploadBuffer@@QEAAPEAXXZ),函数 "public: void cdecl ModelInstance::Update(class GraphicsContext &,float)" (?Update@ModelInstance@@QEAAXAEAVGraphicsContext@@M@Z) 中引用了该符号 1>Model.lib(Model.obj) : error LNK2019: 无法解析的外部符号 "public: void cdecl UploadBuffer::Unmap(unsigned int64,unsigned int64)" (?Unmap@UploadBuffer@@QEAAX_K0@Z),函数 "public: void cdecl ModelInstance::Update(class GraphicsContext &,float)" (?Update@ModelInstance@@QEAAXAEAVGraphicsContext@@M@Z) 中引用了该符号 1>Model.lib(Model.obj) : error LNK2019: 无法解析的外部符号 "public: void cdecl ModelInstance::UpdateAnimations(float)" (?UpdateAnimations@ModelInstance@@QEAAXM@Z),函数 "public: void cdecl ModelInstance::Update(class GraphicsContext &,float)" (?Update@ModelInstance@@QEAAXAEAVGraphicsContext@@M@Z) 中引用了该符号 1>Model.lib(Model.obj) : error LNK2019: 无法解析的外部符号 "public: void cdecl Renderer::MeshSorter::AddMesh(struct Mesh const &,float,unsigned int64,unsigned int64,unsigned __int64,struct Joint const *)" (?AddMesh@MeshSorter@Renderer@@QEAAXAEBUMesh@@M_K11PEBUJoint@@@Z),函数 "public: void cdecl Model::Render(class Renderer::MeshSorter &,class GpuBuffer const &,class Math::ScaleAndTranslation const const,struct Joint const )const " (?Render@Model@@QEBAXAEAVMeshSorter@Renderer@@AEBVGpuBuffer@@QEBVScaleAndTranslation@Math@@PEBUJoint@@@Z) 中引用了该符号 1>MSVCRTD.lib(exe_main.obj) : error LNK2019: 无法解析的外部符号 main,函数 "int __cdecl invoke_main(void)" (?invoke_main@@YAHXZ) 中引用了该符号

walbourn commented 2 years ago

Thank you for the report. Can you provide instructions for reproducing these errors?

tsxy2007 commented 2 years ago

微信图片_20220612084825 this is error

GameDreamByHuo commented 2 years ago

这是来自QQ邮箱的假期自动回复邮件。   你好,我最近正在休假中,无法亲自回复你的邮件。我将在假期结束后,尽快给你回复。

tsxy2007 commented 2 years ago

微信图片_20220612085113 This is the correct setting