how to use dir2 function in matlab?
4 views (last 30 days)
Show older comments
i need to use dir2 function.i have downloaded and stored in system location.
if i run dir2 function...i got following error.. 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;
0 Comments
Answers (1)
David Sanchez
on 5 Sep 2013
If you just downloaded the function dir2 and place it in a location whose path is added to the system, it's bound not to work. Usually, built-in functions make use of some others functions (mex-files quite often). If you don't have those other functions in your system, your function will not work. In your case, it seems you are encountering an issue with a dir2_mex.c function.
See Also
Categories
Find more on MATLAB Compiler in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!