Closed ghost closed 2 years ago
Used headers:
// #include <NRI.h> #include <NRD.h> #include <NRIDescs.hpp> #include <Extensions/NRIWrapperVK.h> #include <Extensions/NRIHelper.h> #include <NRDIntegration.hpp>
Probably, you needs inline in code.
inline
2>Generating Code... 2>VMA.obj : error LNK2005: "public: bool __cdecl NrdIntegration::Initialize(struct nri::Device &,struct nri::CoreInterface const &,struct nri::HelperInterface const &,struct nrd::DenoiserCreationDesc const &)" (?Initialize@NrdIntegration@@QEAA_NAEAUDevice@nri@@AEBUCoreInterface@3@AEBUHelperInterface@3@AEBUDenoiserCreationDesc@nrd@@@Z) already defined in Alter.obj 2>VMA.obj : error LNK2005: "public: bool __cdecl NrdIntegration::SetMethodSettings(enum nrd::Method,void const *)" (?SetMethodSettings@NrdIntegration@@QEAA_NW4Method@nrd@@PEBX@Z) already defined in Alter.obj 2>VMA.obj : error LNK2005: "public: void __cdecl NrdIntegration::Denoise(unsigned int,struct nri::CommandBuffer &,struct nrd::CommonSettings const &,class std::array<struct NrdIntegrationTexture,26> const &,bool)" (?Denoise@NrdIntegration@@QEAAXIAEAUCommandBuffer@nri@@AEBUCommonSettings@nrd@@AEBV?$array@UNrdIntegrationTexture@@$0BK@@std@@_N@Z) already defined in Alter.obj 2>VMA.obj : error LNK2005: "public: void __cdecl NrdIntegration::Destroy(void)" (?Destroy@NrdIntegration@@QEAAXXZ) already defined in Alter.obj 2>VMA.obj : error LNK2005: "public: void __cdecl NrdIntegration::CreatePipelines(void)" (?CreatePipelines@NrdIntegration@@QEAAXXZ) already defined in Alter.obj 2>VMA.obj : error LNK2005: "private: void __cdecl NrdIntegration::CreateResources(void)" (?CreateResources@NrdIntegration@@AEAAXXZ) already defined in Alter.obj 2>VMA.obj : error LNK2005: "private: void __cdecl NrdIntegration::AllocateAndBindMemory(void)" (?AllocateAndBindMemory@NrdIntegration@@AEAAXXZ) already defined in Alter.obj 2>VMA.obj : error LNK2005: "private: void __cdecl NrdIntegration::Dispatch(struct nri::CommandBuffer &,struct nri::DescriptorPool &,struct nrd::DispatchDesc const &,class std::array<struct NrdIntegrationTexture,26> const &,bool)" (?Dispatch@NrdIntegration@@AEAAXAEAUCommandBuffer@nri@@AEAUDescriptorPool@3@AEBUDispatchDesc@nrd@@AEBV?$array@UNrdIntegrationTexture@@$0BK@@std@@_N@Z) already defined in Alter.obj 2>test.obj : error LNK2005: "public: bool __cdecl NrdIntegration::Initialize(struct nri::Device &,struct nri::CoreInterface const &,struct nri::HelperInterface const &,struct nrd::DenoiserCreationDesc const &)" (?Initialize@NrdIntegration@@QEAA_NAEAUDevice@nri@@AEBUCoreInterface@3@AEBUHelperInterface@3@AEBUDenoiserCreationDesc@nrd@@@Z) already defined in Alter.obj 2>test.obj : error LNK2005: "public: bool __cdecl NrdIntegration::SetMethodSettings(enum nrd::Method,void const *)" (?SetMethodSettings@NrdIntegration@@QEAA_NW4Method@nrd@@PEBX@Z) already defined in Alter.obj 2>test.obj : error LNK2005: "public: void __cdecl NrdIntegration::Denoise(unsigned int,struct nri::CommandBuffer &,struct nrd::CommonSettings const &,class std::array<struct NrdIntegrationTexture,26> const &,bool)" (?Denoise@NrdIntegration@@QEAAXIAEAUCommandBuffer@nri@@AEBUCommonSettings@nrd@@AEBV?$array@UNrdIntegrationTexture@@$0BK@@std@@_N@Z) already defined in Alter.obj 2>test.obj : error LNK2005: "public: void __cdecl NrdIntegration::Destroy(void)" (?Destroy@NrdIntegration@@QEAAXXZ) already defined in Alter.obj 2>test.obj : error LNK2005: "public: void __cdecl NrdIntegration::CreatePipelines(void)" (?CreatePipelines@NrdIntegration@@QEAAXXZ) already defined in Alter.obj 2>test.obj : error LNK2005: "private: void __cdecl NrdIntegration::CreateResources(void)" (?CreateResources@NrdIntegration@@AEAAXXZ) already defined in Alter.obj 2>test.obj : error LNK2005: "private: void __cdecl NrdIntegration::AllocateAndBindMemory(void)" (?AllocateAndBindMemory@NrdIntegration@@AEAAXXZ) already defined in Alter.obj 2>test.obj : error LNK2005: "private: void __cdecl NrdIntegration::Dispatch(struct nri::CommandBuffer &,struct nri::DescriptorPool &,struct nrd::DispatchDesc const &,class std::array<struct NrdIntegrationTexture,26> const &,bool)" (?Dispatch@NrdIntegration@@AEAAXAEAUCommandBuffer@nri@@AEAUDescriptorPool@3@AEBUDispatchDesc@nrd@@AEBV?$array@UNrdIntegrationTexture@@$0BK@@std@@_N@Z) already defined in Alter.obj 2>C:\VULKAN\Alter-Old\build\Debug\Alter.exe : fatal error LNK1169: one or more multiply defined symbols found 2>Done building project "Alter.vcxproj" -- FAILED. ========== Rebuild All: 1 succeeded, 1 failed, 0 skipped ==========
Used headers:
Probably, you needs
inline
in code.