fatal error: 'omp.h' file not found on mac
Show older comments
I'm attempting to run the following using a macbook pro 32 bit Sequoia 15.6.1 with Xcode 16:
But I keep getting the error:
>> build_mex
Building with 'Xcode Clang++'.
Error using mex
In file included from
/Users/user/Desktop/Novelis_project/Data/TextureReduction/calcGSH.cpp:16:
/Users/user/Desktop/Novelis_project/Data/TextureReduction/GSHFun.h:2:10:
fatal error: 'omp.h' file not found
2 | #include <omp.h>
| ^~~~~~~
1 error generated.
Error in build_mex (line 3)
mex COMPFLAGS="$COMPFLAGS /openmp" calcGSH.cpp GSHFun.cpp GSHLibrarySmol.cpp -lmwblas
1 Comment
Check
if it helps.
Maybe you only have to include the path where OpenMP is located on your computer as compiler flag:
-L/usr/local/opt/libomp/lib -I/usr/local/opt/libomp/include
Or is it installed somewhere else on your mac ?
Answers (0)
Categories
Find more on Write C Functions Callable from MATLAB (MEX Files) in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!