.mexglx in windows XP

8 views (last 30 days)
Aaditya on 2 Feb 2012
Edited: faraz on 30 Sep 2013
hey all....
I am not able to run .mexglx files in windows XP 32 bit platform... the matlab codes were originally written using 64 bit linux platform.... How to convert it so that it gets executed in XP???
Could anyone please help me out ??

Accepted Answer

Benjamin Schwabe
Benjamin Schwabe on 2 Feb 2012
Do you have the sourcecode that was used for the generation of the mexglx? If not, I have no clue and I assume that there is no way but code disassembly... If you have the sourcecode, create the mex-file on your own by using the mex-command and change the reference to the mexglx accordingly.

More Answers (6)

Walter Roberson
Walter Roberson on 2 Feb 2012
You cannot execute a Linux mex file on MS Windows. You will, as Benjamin suggests, need to rebuild the mex from source.

Aaditya on 4 Feb 2012
yeah ... i have the source code... the error that i get is
Unable to load mex file: C:\Documents and Settings\computer\Desktop\26.1\SamplePtrsFromRegionsMex.dll. The specified module could not be found.
??? Invalid MEX-file 'C:\Documents and Settings\computer\Desktop\26.1\SamplePtrsFromRegionsMex.dll': The specified module could not be found.
But , i have SamplePtrsFromRegionsMex.dll in my current working directory ..
but still i get such error msg....
Ken Atwell
Ken Atwell on 5 Feb 2012
What version of MATLAB are you using? I'm surprised that your MEX file recompiled for Windows carries the extension ".dll". I would expect it to be ".mex32".
Also, can you tell us the command line to MEX you are using, and any output MEX returns?

Sign in to comment.

Aaditya on 9 Feb 2012
First i used matlab 7.0.... But now i have changed it and now i use matlab 7.9.
i got .mexw32 files created. But when i start running the codes in matlab7.9, i get the following error
Invalid MEX-file 'D:\pathname\myMex.mexw32': The specified module could not be found.
However, this .mexw32 file is located in my working directory. But still i get that error.

Jan on 9 Feb 2012
I've asked you already: How did you compile the C-file? The error message appears e.g., if you compile the C-file on one computer with MSVC, but run it on another computer without installing the required distributables.

Aaditya on 9 Feb 2012
i got the code from the link,
Its BPLR code. I first compiled two .m files 'bplr_startup.m' and 'bplr_compile_mex.m', as it was mentioned in README.
I got the above said error when i compiled 'bplr_compile_mex.m'.
When i compiled the program , i got the following error..
Extract BPLR... multiple segmentations... 146 segments obtained sampling ptrs... ??? Undefined function or method 'SamplePtrsFromRegionsMex' for input arguments of type 'cell'.
Error in ==> uniformSamplePtrsFromRegions_ at 25 [dt_max sample_ptrs] = SamplePtrsFromRegionsMex(dt, bbox, grid_spacing);
Error in ==> createUniformSamplePtrsFromDT_ at 8 [ptrs scales ptrs_region] = uniformSamplePtrsFromRegions_(regions, sample_grid_spacing, supp_radius_thresh);
Error in ==> detectBPLR at 25 [ptrs edges scales] = createUniformSamplePtrsFromDT_(regions, im, ucm, contour_im, order_k, sample_grid_spacing);
Error in ==> demo at 111 BPLR = detectBPLR(im, ucm, gPb_thin, order_k, euc_f, im_dim, min_nseg, max_nseg, grid_space, min_elem_scale);
Error in ==> example at 14 [BPLR, phog] =demo(img_file, rsz, order_k, euc_f, min_nseg, max_nseg, grid_space, min_elem_scale, magnif, phog_L, n_angle_bin, n_length_bin);
So sir, can u please see that link and run it in ur computer.

Aaditya on 10 Feb 2012
We compiled the .cc files using a MSVC 6.0 compiler and got the .mexw32 one.


Find more on Write C Functions Callable from MATLAB (MEX Files) 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!