Compiling ReShade
- doodlum
- Topic Author
Less
More
I'm trying to compile ReShade so I can debug crashes, but cloning the repo and building it as described, there are lots of errors related to ImGui.
"one or more multiply defined symbols found".
I'm unsure what I'm doing wrong:
- I used git clone --recurse-submodules github.com/crosire/reshade
- I'm on VS22
- I installed any required dependencies for VS when it asked
- I am building the solution using Debug X64
"one or more multiply defined symbols found".
I'm unsure what I'm doing wrong:
- I used git clone --recurse-submodules github.com/crosire/reshade
- I'm on VS22
- I installed any required dependencies for VS when it asked
- I am building the solution using Debug X64
Please Log in or Create an account to join the conversation.
- crosire
Less
More
I'd try cleaning out the directory, re-clone with Git (including submodules) and build again (Debug x64, Build solution). Just tried that with VS22 to be sure and it ran through successfully without errors. Otherwise it would be helpful to know which exact errors you are seeing.
Please Log in or Create an account to join the conversation.
- doodlum
- Topic Author
Less
More
Thanks. It was probably that I moved it from another directory (ran out of storage!). I'm too busy to have tested it so far, just responding so it doesn't seem like I ignored your response.
Please Log in or Create an account to join the conversation.
- doodlum
- Topic Author
Less
More
No dice. The crash also seems to be coming from ReShade itself from compiling/using shaders. If I remove the shaders it doesn't crash anymore, although enumerate_techniques creates a crash since there's no shaders.
pastebin.com/kk4Tm9iR
pastebin.com/kk4Tm9iR
Please Log in or Create an account to join the conversation.
- doodlum
- Topic Author
Less
More
Here is the shader which crashes reshade
pastebin.com/YNF22Ak2
pastebin.com/YNF22Ak2
Please Log in or Create an account to join the conversation.
- crosire
Less
More
1 year 3 months ago - 1 year 3 months ago #6
by crosire
Replied by crosire on topic Compiling ReShade
Where does "imguid.lib" come from? That is not an artifact the ReShade build produces (it only produces a "ImGui.lib", by the deps\ImGui.vcxproj project). It's also weird that one is supposedly located at "H:\dev\reshade\ImGui.lib", since the Visual Studio projects are configured to place those at "$(SolutionDir)intermediate\$(ProjectName)\$(Platform)\$(Configuration)\" (which cannot result in that path).
The crash is happening because the effect is writing to a texture with a semantic (render target is set to "texture myTextureColorTexout : o0"). That is not supported, those may only be read from (though it shouldn't crash, but just error out, I fixed that now: github.com/crosire/reshade/commit/0edc74...eabe4255f26014149353 ). The render target of an effect may only be the default back buffer (which can be changed through the render target passed to "render_effects"/"render_technique") or fully defined textures in the effect. This is because textures with semantics are not well defined (they are missing information about dimensions/format/...) until set by an add-on, but ReShade needs that information early to be able to make textures usable as a render target for effects.
The crash is happening because the effect is writing to a texture with a semantic (render target is set to "texture myTextureColorTexout : o0"). That is not supported, those may only be read from (though it shouldn't crash, but just error out, I fixed that now: github.com/crosire/reshade/commit/0edc74...eabe4255f26014149353 ). The render target of an effect may only be the default back buffer (which can be changed through the render target passed to "render_effects"/"render_technique") or fully defined textures in the effect. This is because textures with semantics are not well defined (they are missing information about dimensions/format/...) until set by an add-on, but ReShade needs that information early to be able to make textures usable as a render target for effects.
Last edit: 1 year 3 months ago by crosire.
Please Log in or Create an account to join the conversation.
- doodlum
- Topic Author
Less
More
I was compiling the debug reshade solution, so I believe it is just a debug version of the imgui lib file.
For sanity, I tried to compile it on my macbook.... it worked. I have no idea why VS screwed up like that, guess we'll never know.
For sanity, I tried to compile it on my macbook.... it worked. I have no idea why VS screwed up like that, guess we'll never know.
Please Log in or Create an account to join the conversation.
- crosire
Less
More
But the thing is that the build produces a "ImGui.lib" even in debug, "imguid.lib" is not specified anywhere, hence my confusion...
Please Log in or Create an account to join the conversation.