This is a minimal test case to attempt to recreate a specific problem diagonalizing a matrix in a Psi4 test case.
icpc -std=c++14 -mkl test.cc
g++ test.cc -std=c++14 /your/path/to/lapack/lib/liblapack.a /your/path/to/lapack/lib/libblas.a /your/path/to/gcc/lib64/libgfortran.so
(the last part is only needed if BLAS/LAPACK need libgfortran)
g++ test.cc -std=c++14 -framework Accelerate