cannot build mex files using MinGW
显示 更早的评论
I have configured MinGW using mex -setup but cannot seem to succesfully build files. I am using Matlab R2018a with Windows 10.
Trying:
mex('-R2018a','-O', 'CFLAGS="\$CFLAGS -fopenmp"', '-O','LDFLAGS="\$LDFLAGS
-fopenmp"',[path,'private/get_from_3D_projection_mex.cpp'], '-output', [path,
'private/get_from_3D_projection_mex'])
and I get an error:
Error using mex
g++: error: \-fexceptions: No such file or directory
Trying this solution did not work for me https://github.com/cjlin1/libsvm/issues/55
mex('-R2018a','-O', 'COMPFLAGS="\$COMPFLAGS -fopenmp"', '-O','LDFLAGS="\$LDFLAGS
-fopenmp"',[path,'private/get_from_3D_projection_mex.cpp'], '-output', [path,
'private/get_from_3D_projection_mex'])
Then I have:
Error using mex
D:\matl\cSAXS_matlab_base_package\+utils\private\get_from_3D_projection_mex.cpp:76:25: fatal error:
sys/sysinfo.h: No such file or directory
#include <sys/sysinfo.h>
Also trying to build it with VS 2015 I get the latter error...
Any ideas? thanks in advance!
2 个评论
Walter Roberson
2022-3-31
I do not know why you have those two \ in the mex call.
Toni Uusimäki
2022-3-31
回答(1 个)
类别
在 帮助中心 和 File Exchange 中查找有关 MATLAB Support for MinGW-w64 C/C++ Compiler 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!