How to compile matlab library with C including openmp?

11 views (last 30 days)
Using mbuild to compile my C code reports the following error: Unknown MEX argument '-fopenmp'. I'm wondering how to integrate the matlab library into my C code including openmp?

Answers (1)

Walter Roberson
Walter Roberson on 6 Feb 2018
  2 Comments
Walter Roberson
Walter Roberson on 7 Feb 2018
For Linux I would use the same approach as on Mac:
mex -v CXXFLAGS="$CXXFLAGS -fopenmp"

Sign in to comment.

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!