How to link Intel Open Image Denoise to a Qt project?
-
wrote on 1 Feb 2022, 04:49 last edited by SDOAJ 2 Jan 2022, 05:24
I'm trying to use Intel Open Image Denoise in a raytracer project, but I can't seem to link it properly. I downloaded the Windows precompiled binaries from the downloads page and placed them in my project directory, then I added the
.lib
file through the GUI for adding external libraries. It added these lines to my.pro
file:win32: LIBS += -L$$PWD/oidn/lib/ -lOpenImageDenoise INCLUDEPATH += $$PWD/oidn/include DEPENDPATH += $$PWD/oidn/include
With these, I was able to include the header with
#include <OpenImageDenoise/oidn.hpp>
, and the project was able to build. But when I tried the examples on the OIDN page, my project would crash immediately upon opening, going to the black console screen withPress <RETURN> to close this window...
without any other console output. I found that commenting out all lines related to denoising (other than the include statement) allowed the program to run as normal. Including even one line, such as the first lineoidn::DeviceRef device = oidn::newDevice();
, causes the program to crash.I also tried making a completely new project and adding OIDN to that, but I ran into a separate issue there. I added the library the same way, but whenever I run the test project, I get this popup:
I tried manually adding the
.dll
withLIBS += $$PWD/oidn/bin/OpenImageDenoise.dll
, but it still didn't work.I also found this thread, but the poster there was compiling the source himself rather than downloading the prebuilt binaries, so it didn't seem applicable.
With all that said, can anybody help with this issue? I'm relatively inexperienced with adding libraries to Qt projects, so it's entirely likely I missed something trivial.
-
You have to put the dll in your PATH
-
You have to put the dll in your PATH
Hi,
@Christian-Ehrlicher said in How to link Intel Open Image Denoise to a Qt project?:
You have to put the dll in your PATH
To add to @Christian-Ehrlicher, do that in the Run part of the Project panel. No need to start modifying your system's PATH environment variable.
-
You have to put the dll in your PATH
wrote on 1 Feb 2022, 18:11 last edited by@Christian-Ehrlicher @SGaist thank you so much! I did that and the project works now.
1/4