Skip to content

Build shared librares on Linux? #313

Open

Description

@robo-todd
  • Diligent Release v2.5.6
  • OS: Ubuntu 22.04, Vulkan SDK 1.3.290
  • Build tools: Cmake 3.28, gcc 11.4.0
  • GPU and driver: NVIDIA GeForce RTX 3080, Driver 550.107.02

I am integrating DiligentEngine into an external build system / project.
I am building DiligentEngine stand-alone using a default cmake invocation in a separate build directory.
I builds fine and produces output and installs files, samples run, etc

The documentation talks about using shared libraries in your project to simplify linking, but only the Archiver and GraphicsEngineVk, etc. are produced as shared libraries and the rest of the libraries like DiligentCore, etc. are all static libraries. There appears to be no CMake option to request that shared libraries be produced. Nearly all output libraries in the default setup are static libraries.

How can one build DiligentEngine as shared libraries as described in the documentation as a stand-alone set of libraries/headers to integrate into another build system?

When I use the CMake option BUILD_SHARED_LIBS=ON the build fails before completion with many undefined references to things like Diligent::LinuxFileSystem::OpenFile and Diligent::DebugAssertionFailed, etc. during linking.

Activity

  1. TheMostDiligent commented on Sep 9, 2024

    @TheMostDiligent
    Contributor

    Currently, only the Core API libraries are built as shared libraries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions