Created
September 5, 2016 12:50
Revisions
-
bonanza123 created this gist
Sep 5, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ MATLAB usually requires acient gcc versions to compile MEX files (e.g. v4.9.x for R2016b). However, archlinux usually ships with the most recent version of gcc and this may results in some conflicts with linked C++ ABI. Fortunately, archlinux AUR provides also older gcc versions (such as gcc49). The problem is that MATLAB's `mex -setup` doesn't find these additionally installed gcc versions. The solution is to go into your local mex config in: `/home/XX/.matlab/R2016b/mex_C++_glnxa64.xml` and replace the line `<cmdReturns name="which g++" />` e.g. with `<cmdReturns name="which g++-4.9" />`. Additionally, change `<cmdReturns name="g++ -print-file-name=libstdc++.so"` to `<cmdReturns name="g++-4.9 -print-file-name=libstdc++.so"`. Then try to run `mex.getCompilerConfigurations('C++','Selected')` from MATLAB and verify the settings. (Don't forget to the same if the mex_C xml files etc).