0

I want to use the file exchange about kd-tree in matlab and search in mathwork site and saw the below m-files but I cant understand how can I mex files. in comments "Kuan-Ting Yu" say: 1. use mex -setup to find your compiler. E.g. VS 2010 2. in "kdtree_common.h", replace #include "c:/.../mex.h" with "mex.h" 3. dir to ./src and mex all .cc file what is his mean? haw can I mex all .cc file? http://www.mathworks.com/matlabcentral/fileexchange/4586-k-d-tree

1 Answer 1

0

To mex all source files, you have to call the mex function.

To call mex for all cc-files in a directory, use

for file = dir('*.cc'); mex(file.name) ; end
3
  • thanks... how can I find my compiler using mex -setup ?
    – Ahmad
    Apr 17, 2014 at 19:58
  • Is a compiler compatible to your matlab version installed? Then run mex -setup and it should find it automatically. If not, what compiler, which matlab version?
    – Daniel
    Apr 17, 2014 at 20:25
  • my matlab versian is 7.12 matlab 2011 a and No supported SDK or compiler was found on this computer. For a list of supported compilers, see mathworks.com/support/compilers/R2011a/win64.html was my error
    – Ahmad
    Apr 17, 2014 at 20:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.