Error in dir2 function

2 次查看(过去 30 天)
sandy
sandy 2013-9-17
i have used dir2(),i am having error...any solution for this..
lcc preprocessor error: dir2_mex.c:4 Could not find include file <shlwapi.h>
Warning dir2_mex.c: 89 assignment of pointer to pointer to char to pointer to char
Warning dir2_mex.c: 90 assignment of pointer to pointer to char to pointer to char
Warning dir2_mex.c: 91 assignment of pointer to pointer to char to pointer to char
Warning dir2_mex.c: 92 assignment of pointer to pointer to char to pointer to char
Warning dir2_mex.c: 93 assignment of pointer to pointer to char to pointer to char
Error dir2_mex.c: 104 operands of != have illegal types `int' and `pointer to void'
Error dir2_mex.c: 104 too many arguments to `fileSplit'
Error dir2_mex.c: 104 too many arguments to `fileSplit'
Warning dir2_mex.c: 104 possible usage of fn before definition
Warning dir2_mex.c: 104 possible usage of dir before definition
Warning dir2_mex.c: 104 possible usage of parts before definition
Warning dir2_mex.c: 104 assignment of pointer to pointer to char to pointer to char
Warning dir2_mex.c: 104 assignment of pointer to pointer to char to pointer to char
Error dir2_mex.c: 104 operands of != have illegal types `int' and `pointer to void'
Warning dir2_mex.c: 104 assignment of pointer to pointer to char to pointer to char
Error dir2_mex.c: 107 operands of != have illegal types `int' and `pointer to void'
Error dir2_mex.c: 107 too many arguments to `fileSplit'
Error dir2_mex.c: 107 too many arguments to `fileSplit'
Warning dir2_mex.c: 107 assignment of pointer to pointer to char to pointer to char
Warning dir2_mex.c: 107 assignment of pointer to pointer to char to pointer to char
Error dir2_mex.c: 107 operands of != have illegal types `int' and `pointer to void'
Warning dir2_mex.c: 107 assignment of pointer to pointer to char to pointer to char
Warning dir2_mex.c: 121 assignment of pointer to pointer to char to pointer to char
Error dir2_mex.c: 127 operands of = have illegal types `pointer to char' and `int'
Warning dir2_mex.c: 131 assignment of pointer to pointer to const char to pointer to pointer to pointer to char
Warning dir2_mex.c: 135 assignment of pointer to pointer to char to pointer to pointer to pointer to char
Warning dir2_mex.c: 137 assignment of pointer to pointer to char to pointer to pointer to pointer to char
Error dir2_mex.c: 150 extraneous return value
Warning dir2_mex.c: 80 local `int hasRec' is not referenced
Error dir2_mex.c: 255 undeclared identifier `MAXDWORD'
Warning dir2_mex.c: 269 assignment of pointer to char to pointer to pointer to char
Warning dir2_mex.c: 270 assignment of pointer to const char to pointer to pointer to char
Warning dir2_mex.c: 255 possible usage of MAXDWORD before definition
Warning dir2_mex.c: 324 assignment of pointer to const char to pointer to array 261 of char
Error dir2_mex.c: 357 operands of = have illegal types `pointer to char' and `int'
Error dir2_mex.c: 358 operands of = have illegal types `char' and `pointer to void'
Error dir2_mex.c: 359 operands of = have illegal types `pointer to char' and `int'
Error dir2_mex.c: 360 operands of = have illegal types `char' and `pointer to void'
Warning dir2_mex.c: 345 local `pointer to char temp' is not referenced
16 errors, 24 warnings
C:\PROGRA~1\MATLAB\R2010B\BIN\MEX.PL: Error: Compile of 'dir2_mex.c' failed.
??? Undefined function or method 'printf' for input arguments of type 'char'.
Error in ==> dir2>install_dir2_mex at 202 printf('COuld not install the mex file. Switch to the .m version\n');
Error in ==> dir2 at 50 install_dir2_mex;
Error in ==> append at 2 d = dir2(folder,'*.zip');
  1 个评论
Jan
Jan 2013-9-17
编辑:Jan 2013-9-17
Please notice that dir2 is not a part of Matlab's toolboxes. Then we can only guess, which function you are talking of. It would be much smarter, when you add a link to the source. If it is a FEX submission, asking the author at first is recommended.
What is the difference to http://www.mathworks.com/matlabcentral/answers/86394-how-to-use-dir2-function-in-matlab? Please do not post multiple questions for the same problem.

请先登录,再进行评论。

回答(1 个)

Jan
Jan 2013-9-17
The LCC compiler is very old, not powerful and contains many bugs. Here it seems, like it cannot find the header "shlwapi.h". Other compilers include this header as standard. Therefore I suggest to install e.g. the compilers included in the free SDKs for Windows.

类别

Help CenterFile Exchange 中查找有关 MATLAB Compiler 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by