Skip to content

Build shared librares on Linux? #313

@robo-todd

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.

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