how to convert ".mex32" to be able to it use under 64bit windows?
Show older comments
I have a ".mexw32" file and want to run it on windows 64 bit. I don't have the source code. Is there anyway to get around this problem? how to convert ".mex32" to be able to use it under 64bit windows?
Thanks!
Answers (2)
Andreas Goser
on 2 Mar 2011
1 vote
Not a technical advice, but a general advice. Even a couple of real big companies - now that they are going from 32 bit to 64 bit - discover their dependency on sometimes very small engineering companies. Those companies sell small toolboxes or blocksets in form of MEX files and C MEX S-functions. As the need to protect their intellectual property, they keep the source code. But often there is no agreement to provide a 64 Bit version (at least free of charge)
Walter Roberson
on 2 Mar 2011
0 votes
No, there is no cost-effective way. It could be done in theory, but it would involve writing (or using) operating system emulation technology such as is used by VINE (a linux program for running Windows executables.)
3 Comments
Ashish Uthama
on 2 Mar 2011
*WINE - http://www.winehq.org/
Walter Roberson
on 2 Mar 2011
I knew it had _something_ to do with grapes! ;-)
Walter Roberson
on 2 Mar 2011
I can think of another way, involving analyzing the dll that is the .mex32 object, using a disassembler to produce the object code and data structures, automatically editing the assembly code to use 64 bit addresses, and recompiling. This might work okay for simple interfaces, but it will be a mess in general, as it would also have to take in to account that sometimes constants would have to be changed to take into account that offsets in to structures would have to change in order to make room to store 8 byte pointers in place of 4 byte pointers. And there are a _lot_ of different ways to calculate address offsets.
I really think emulation would be a lot more robust.
Categories
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!