How to compile mex file

9 views (last 30 days)
Sergio Palomo
Sergio Palomo on 8 Mar 2021
Edited: James Tursa on 11 Mar 2021
I am trying to use a Matlab use function Boosted Binary Regression Trees but according to the readme I have to complie a mex file first. To be exact here are the instructions given in the readme:
First you need to compile C++ code to get mex file. To compile with OpenMP support, do the following:
mex findBestSplit.cpp COMPFLAGS="/openmp $COMPFLAGS"
I have never used OpenMP before so I am not sure what I am supposed to do exactly, can someone walk me through the steps to get this to work?

Answers (1)

James Tursa
James Tursa on 8 Mar 2021
Edited: James Tursa on 8 Mar 2021
You are simply supposed to type (or copy & paste) that text into the command line at the > prompt. Just be in the directory where the source code is located when you execute this mex command.
Note that the mex instructions given may need to be adjusted if your system is different from the author's system. The OpenMP option may be different, the COMPFLAGS may be different, etc.
  10 Comments
Sergio Palomo
Sergio Palomo on 11 Mar 2021
Is that right? I get the following:
'which' is not recognized as an internal or external command,
operable program or batch file.

Sign in to comment.

Tags

Community Treasure Hunt

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

Start Hunting!