フィルターのクリア

How to compile C++14 code in mex (Mac OS)

4 ビュー (過去 30 日間)
Janos Buttgereit
Janos Buttgereit 2018 年 5 月 23 日
回答済み: Nathan Zimmerberg 2019 年 11 月 23 日
Hi,
a library included in my mex file uses C++14 features, so trying to simply compile my files in the mex fails with errors like these:
error: 'auto' return without trailing return type; deduced return types are a C++14 extension
So, is there a way to enable C++14 when building a mex? As my compiler supports it, I wonder if there is any reason this shouldn't be working?

回答 (1 件)

Nathan Zimmerberg
Nathan Zimmerberg 2019 年 11 月 23 日
I did the following to add C++14 features
mex -v CXXFLAGS='$CXXFLAGS -std=c++14' geograv_wrapper.cpp -R2018a

カテゴリ

Help Center および File ExchangeWrite C Functions Callable from MATLAB (MEX Files) についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by