Skip to content

Commit

Permalink
Fix issue #1
Browse files Browse the repository at this point in the history
Use CXXFLAGS instead of CFLAGS, and update docs on difference between
MATLAB/OS X/Linux/Windows.
  • Loading branch information
jdrugo committed Oct 28, 2014
1 parent 6bcf44a commit 1fb50e9
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions matlab/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,24 @@ Usage
The MATLAB MEX functions need to be compiled before use. To do so, run

```Shell
mex CFLAGS='$CFLAGS -std=c++11' ddm_fpt.cpp ../src/ddm_fpt_lib.cpp
mex CFLAGS='$CFLAGS -std=c++11' ddm_fpt_full.cpp ../src/ddm_fpt_lib.cpp
mex CXXFLAGS='$CXXFLAGS -std=c++11' ddm_fpt.cpp ../src/ddm_fpt_lib.cpp
mex CXXFLAGS='$CXXFLAGS -std=c++11' ddm_fpt_full.cpp ../src/ddm_fpt_lib.cpp
```

at the command line. The location of the `mex` executable and exact syntax for specifying the compiler flags might be OS-dependent.
at the MATLAB prompt. Alternatively, the files can be compiled at the shell. Do do so, use

```Shell
mex CXXFLAGS="$CXXFLAGS -std=c++11" ddm_fpt.cpp ../src/ddm_fpt_lib.cpp
mex CXXFLAGS="$CXXFLAGS -std=c++11" ddm_fpt_full.cpp ../src/ddm_fpt_lib.cpp
```

at the Windows Command Prompt (using double quotes, (")), or

```Shell
mex CXXFLAGS='$CXXFLAGS -std=c++11' ddm_fpt.cpp ../src/ddm_fpt_lib.cpp
mex CXXFLAGS='$CXXFLAGS -std=c++11' ddm_fpt_full.cpp ../src/ddm_fpt_lib.cpp
```

at the Mac and Linux shell command line (using single quotes (')). Note that, for older versions of MATLAB, all occurences of `CXXFLAGS` might need to be replaced with `CFLAGS`.

The location of the `mex` executable and exact syntax for specifying the compiler flags might be depend on OS and installation details.

0 comments on commit 1fb50e9

Please sign in to comment.