Borrar filtros
Borrar filtros

how to use dir2 function in matlab?

6 visualizaciones (últimos 30 días)
sandy
sandy el 5 de Sept. de 2013
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;

Respuestas (1)

David Sanchez
David Sanchez el 5 de Sept. de 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.
  1 comentario
sandy
sandy el 5 de Sept. de 2013
Editada: sandy el 17 de Sept. de 2013
the downloaded file contains dir2_mex.c file..anything problem with my compiler?? but how to add the path to the system as u said? OR any other way to overcome this problem?....any other way..........

Iniciar sesión para comentar.

Categorías

Más información sobre Function Creation en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by