>> mex -I 'D:\libjpeg-turbo64_OpHuff\include' jpeg_read.c 'D:\libjpeg-turbo64_OpHuff\lib\jpeg.lib'
jpeg_read.c
jpeg_read.c(52) : fatal error C1083: 无法打开包括文件:“jerror.h”: No such file or directory
D:\SOFTWAREINSTALL\MATLAB\R2012A\BIN\MEX.PL: Error: Compile of 'jpeg_read.c' failed.
Error using mex (line 206)
Unable to complete successfully.
在matlab里面编译jpegtbx_1.4时报上述错误:
help mex
-I<pathname>
Add <pathname> to the list of directories to search for #include
files. Do not add a space after this switch.
也就是-I后不能有空格,去掉空格重新运行即可。
>> mex -I'D:\libjpeg-turbo64_OpHuff\include' 'jpeg_read.c' 'D:\libjpeg-turbo64_OpHuff\lib\jpeg.lib'