Linking library
rriiaa opened this issue · 4 comments
I want to build the example code by linking the libclDNN64.so. How do I build it?
Hi Rriiaa,
you can copy-paste settings from test or tutorial project/source code.
Thanks for your answer : )
So, I'm curious to know what command to compile with gcc.
ex) g++ simple_test.cpp -o simple_test.cpp -Linking clDNN Library
Hi rriiaa,
The clDNN library can be handled as normal library. IMO You need to only provide correct location for headers (with -I
), library (with -L
if not installed into standard location; also you probably need to define -rpath
in this case, e.g. -Wl,-rpath,<directory>
). You should also specify at least -std=c++11
(for older compilers). I would also recommend to use -fPIC
/ -fPIE
.
I would recommend start testing with command-line similar to below:
g++ simple_test.cpp -o simple_test.out -std=c++11 -I<directory with clDNN api / include headers> -lclDNN64
Thanks a lot 👍
Working well!!!