I'm trying to compile a Matlab mex project on Mac OS X 10.12.1. I run the following command:
mex HybridEMMex.cpp Hybrid.cpp Util.cpp COMPFLAGS="/openmp $COMPFLAGS" CXXFLAGS="\$CXXFLAGS -std=c++0x" LDFLAGS="\$LDFLAGS -fopenmp"
It throws an error:
Building with 'Xcode Clang++'.
Error using mex
/Users/tiendh/Projects/FisherVector/hglmm_fv_v1.6/fv/HGLMM_linux/Hybrid.cpp:6:10: fatal error: 'omp.h' file not found
#include <omp.h>
^
1 error generated.
I've installed gcc because I suspect the compiler clang is the cause of this problem. However, I don't know how to make Matlab use the correct compiler. Please also beaware that I don't know if the error comes from clang. How can I compile the project? Many thanks.