I'd like to build the Halide tutorials on mac.
The instruction says:
// On os x:
// g++ lesson_02*.cpp -g -I <path/to/Halide.h> -I <path/to/tools/halide_image_io.h> -L <path/to/libHalide.so> -lHalide `libpng-config --cflags --ldflags` -ljpeg -o lesson_02 -std=c++17
// DYLD_LIBRARY_PATH=<path/to/libHalide.dylib> ./lesson_02
From the release of Halide, I can locate Halide.h and libHalide.dylib but not libHalide.so.
Where do I find it?
Example:
find . -name 'Halide.h'
./include/Halide.h
but looking for the .so file returns nothing.
The instructions were originally written for Linux systems. On macOS, shared libraries use the
.dylibextension, not.so, so this amounts to a typo in the tutorial.That said, I would recommend using CMake instead...
This build is portable across Windows, macOS, and Linux.