RenderKit / oidn

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

Using Precompiled OIDN in linux #70

Closed GoodLuck95 closed 4 years ago

GoodLuck95 commented 4 years ago

Hi, I've download the precompiled OIDN to include them in a C++ project. I've create an example.cpp to try them,

#include "include/OpenImageDenoise/oidn.hpp"
using namespace oidn;
int main() {
    oidn::DeviceRef device = oidn::newDevice();
    device.commit();
}

However, when i try compiling it with the command

g++ example.cpp

I got the following error

/tmp/ccEJJInc.o: In function oidn::DeviceRef::~DeviceRef()': example.cpp:(.text._ZN4oidn9DeviceRefD2Ev[_ZN4oidn9DeviceRefD5Ev]+0x23): undefined reference tooidnReleaseDevice' /tmp/ccEJJInc.o: In function oidn::DeviceRef::commit()': example.cpp:(.text._ZN4oidn9DeviceRef6commitEv[_ZN4oidn9DeviceRef6commitEv]+0x17): undefined reference tooidnCommitDevice' /tmp/ccEJJInc.o: In function oidn::newDevice(oidn::DeviceType)': example.cpp:(.text._ZN4oidn9newDeviceENS_10DeviceTypeE[_ZN4oidn9newDeviceENS_10DeviceTypeE]+0x15): undefined reference tooidnNewDevice' collect2: error: ld returned 1 exit status

Am I missing something or they cannot be use with the precompliled version and I should use the source code and compile it?