Skip to content

[BUG] RenderDoc DLL not being copied to bin folder when linking with source #420

@stegreg

Description

@stegreg

Environment

  • Windows 11
  • CMake 4.3.3
  • Visual Studio 18.6.2 (tested also with 18.6.0)

Steps to reproduce

The following steps are based on the "Link with source" path for the "Setting up a project" documentation page

  1. Clone B3DFramework into C:\Development with "git clone https://github.com/GameFoundry/bsf.git"
  2. Create C:\Development\MyProject folder where the application project code will be placed
  3. Create C:\Development\MyProject\CMakeLists.txt and copy-paste the content from the documentation page
  4. Change line 8 of the CMakeLists.txt from "C:/bsf" to "C:/Development/bsf"
  5. Create C:\Development\MyProject\Main.cpp file and copy-paste the content from the documentation page
  6. Open CMake GUI
  7. Set "Where is the source code" to "C:/Development/MyProject"
  8. Set "Where to build the binaries" to "C:/Development/MyProject/Build"
  9. Click "Configure" and then "Generate"
  10. Open the Visual Studio solution
  11. Set "myApp" as default startup project
  12. Compile and run with debugger attached

Result

Inside RenderDocFrameCapture::LoadRenderDocAPI(), mRenderDocLibrary should be initialized with the loaded DLL. However, its internal mHandle is NULL:
Image
As a result, the application crashes when it reaches B3D_ENSURE(fnGetAPI), because fnGetAPI is NULL.

If, instead, I manually copy the renderdoc.dll from "C:\Development\bsf\Dependencies\RenderDoc\bin" to "C:\Development\MyProject\Build\bin\x64\Debug", then the mHandle is correctly initialized:
Image

Also, according to the documentation:
Unlike with Link with binaries approach you do not need to do any file copying, until you are ready to send the application to your users. After the build the application is ready to run.
So to my understanding, renderdoc.dll should be automatically placed inside "C:\Development\MyProject\Build\bin\x64\Debug" among with other DLLs, but it is not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions