bombomby / optick

C++ Profiler For Games

Home Page:https://optick.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Linking Optick built with CMake fails on Vulkan application

GasimGasimzada opened this issue · comments

I have built Optick using CMake using the following flags:

cmake . -B build -DCMAKE_INSTALL_PREFIX={{VENDOR_DIR}}
cmake --build build --config {{BUILD_MODE}}
cmake --install build --config {{BUILD_MODE}}

When I link optick in my application, I get the following warnings during compilation:

1>OptickCored.lib(OptickCored.dll) : warning LNK4006: __NULL_IMPORT_DESCRIPTOR already defined in vulkan-1.lib(vulkan-1.dll); second definition ignored
1>MainLoop.obj : warning LNK4006: "public: __cdecl Optick::Event::Event(struct Optick::EventDescription const &)" (??0Event@Optick@@QEAA@AEBUEventDescription@1@@Z) already defined in OptickCored.lib(OptickCored.dll); second definition ignored
1>MainLoop.obj : warning LNK4006: "public: __cdecl Optick::Event::~Event(void)" (??1Event@Optick@@QEAA@XZ) already defined in OptickCored.lib(OptickCored.dll); second definition ignored

When I run the app, it fails because of the DLL location mismatch; however, I don't want to use dynamic library for Optix.

I thought it is possible to run Optick as a static library, not a separate DLL. However, looking into CMakeLists, I couldn't find a way to disable DLL builds.