- Open the file svm_common.h located in the svm_light directory.
- Find the line that contains the “sizeof” operator and check for any syntax errors or inconsistencies.
- Make sure that the syntax of the “sizeof” operator is correct. It should be in the form “sizeof(type)”.
- Save the file after making any necessary corrections.
error using mex while running svm struct
1 次查看(过去 30 天)
显示 更早的评论
Hello,
I just started with Matlab and have a problem istalling the following package.
I am using MATLAB R2023a and I try to install A MATLAB wrapper of SVMstruct, A. Vedaldi, http://www.vlfeat.org/~vedaldi/code/svm-struct-matlab.html, 2008..
Therefore I downloaded the Git repository and Visual C. After run the followin command:
run('//.../svm-struct-matlab-master/makefile_windows.m')
I got the following error:
doing hideo
Building with 'Microsoft Visual C++ 2022 ©'.
Error using mex
svm_hideo.c
\\...svm-struct-matlab-master\svm_light\svm_common.h(447): error C2059: Syntaxfehler: "sizeof"
Error in makefile windows (line 3)
mex -largeArrayDims -c -DWIN ./svm_light/svm_hideo.c
Error in run (line 91)
evalin('caller', strcat(script, ';'));
Thank everyone for your help.
0 个评论
回答(1 个)
Raghav
2023-8-4
Hi Luise,
The error you encountered suggests that there is a syntax error in the file “svm_common.h” located in the svm_light directory of the SVMstruct MATLAB wrapper. This error is related to the use of the “sizeof” operator in that file.
To resolve this issue, you can try the following steps:
Once you've made the changes, try running the “makefile_windows.m” script again. If the error persists, please provide more information about the specific line in “svm_common.h” since that is causing the error.
Hope it helps,
Best Regards,
Raghav Bansal
MathWorks Technical Support
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!