I have a project that contains both an executable and a shared library. The executable is linked to the shared library. Both the executable and shared library needs access to the Vulkan API, which I would like to load through the volk metaloader. The first way I tried was to link volk to the shared library statically.
Executable -> Library -> Volk
However, while the shared library linked properly, the executable didn’t because the vulkan functions loaded by volk have the .hidden
attribute. This resulted in many ‘unresolved symbol’ errors when linking the executable.
The second way I tried was to link both the executable and the library to volk statically.
Executable -> Volk
Library -> Volk
Executable -> Library
However, during the linking of the executable, I would receive the error
hidden symbol is referenced by DSO
suggesting that the executable is still trying to use volk from the shared library. How would I go upon fixing this?