RenderKit / oidn

Intel® Open Image Denoise library
https://www.openimagedenoise.org/
Apache License 2.0
1.78k stars 164 forks source link

Using OIDN in Qt Creator #99

Closed Amir-Arsalan closed 3 years ago

Amir-Arsalan commented 3 years ago

Hi. I am a bit novice in C++ so I apologize in advance if my question is simple. I want to use ODIN in a program that I am writing/executing in Qt Creator. Should I simply compile OIDN outside Qt Creator and then do #include <OpenImageDenoise/oidn.hpp> in my code in order to be able to use OIDN?

Amir-Arsalan commented 3 years ago

@atafra I just successfully compiled OIDN and moved the entire directory to where my code is.

Then I tried to initialize a new oidn object for C++11 as follow:

oidn::DeviceRef device = oidn::newDevice();
device.commit();

But this gives me the following errors: image

I'm not sure why I'm getting those errors. Am I supposed to do something else before executing those two lines?

Note that doing #include "oidn/include/OpenImageDenoise/oidn.hpp" works and autocomplete works for oidn. Is this the correct way of including oidn in my codebase?

Amir-Arsalan commented 3 years ago

The issue is solved now: https://stackoverflow.com/questions/66105099/how-to-link-an-external-library-in-qt-creator-when-libs-l-doesnt-seem