I'm trying to get started with a domain-specific language (C++ extension) for image processing called Halide.
Following the Halide README, here's what I've tried:
~/halide.~/halide directory, I created hello_halide.cpp, as described in the Using Halide section of this page.Tried to compile hello_halide.cpp:
g++-4.6 -std=c++0x hello_halide.cpp -L halide -lHalide -ldl -lpthread -o hello_halide
But, g++ can't find libhalide:
/usr/bin/ld: error: cannot find -lHalide
Tried adding ~/halide to my $PATH and $LD_LIBRARY_PATH, but this didn't help.
How can I compile this basic hello_halide.cpp Halide program?
Notes:
-L halide tells the linker to look for the library in the subdirectory halide. In this case that means that your source file hello_halide.cpp should be in a folder ~/myfolder/, and the library libHalide.so at ~/myfolder/halide/libHalide.so (or .a if it's static). If it's somewhere else, pass an absolute path to -L.
Your idea of setting LD_LIBRARY_PATH or PATH does not work since the latter is for directories that will be searched for executables and the former is for directories that will be searched for shared libraries when you launch an executable that needs shared libraries.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With