Follow the instructions here to install Quantlib.
Make especially sure that you use the --with-intraday
flag for QuantLib.
The default MacOS clang++ for High Sierra does not include support for OpenMP, so you'll need to install a version that does and then set R to use it for compiling libraries.