-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Matlab toolbox installation #195
Comments
Dear @tvdbogert
Assuming you did not change the
To my knowledge, there is unfortunately no easy way provided by Matlab to compile non-Matlab code. Ezc3d is primarily a C++ library with Python and Matlab bindings. Therefore, something like wheeling in Python must be available in order to help compilation. As stated, I am not aware of such a thing. Consequently, providing a compiled version of ezc3d implies to manually compile it for the supported platforms (Windows, Mac and Linux) and each of the supported Matlab version (that is >2018a), which is a total of 24 versions on possibly two different computers (PC and Mac), for each ezc3d release... This is highly time consuming, and I've decided, based on this discussion #177 and this one #24 not to go with providing binaries for Matlab. That said, I am in the process of adding octave binaries in conda-forge. The octave binaries are supposed to be less efficient mex files, but at least they exist.. They can therefore be downloaded and installed easily, but still it requires to manually change the extension to be recognized by Matlab, and is only available for Linux and Mac, as octave is not distributed for Windows on conda-forge. So the short answer is yes, it can be fixed, but at the price of a huge price of manual work which I am unfortunately not ready to pay... |
That makes sense. It was easy enough for me to turn on the Matlab bindings in CMake and build them. This produced a Matlab toolbox folder, and I can confirm that I can give someone that folder and it worked correctly for them. So we have this working fine now. If you're interested in additional feedback, read on... Unfortunately, this no longer seems to work in the version I built today. The toolbox is split into two folders:
Note the first one is in C:/ which is not really a good place... When I combined the contents of the two folder, put it in my Matlab path, I got the error "invalid MEX file" which usually means that a dll is missing or not compatible. I have not dug deeper, I can use the previously built version. Also it's better not to assume a specific MATLAB version to install the toolbox. Why not put the toolbox binaries in the ezc3d-dev folder and instruct the user to put it in the Matlab path. That way, also I don't need to run Visual Studio as administrator. |
Hi again!
This is weird, I may have broken something when I have done the Octave binder last week, I have a look in the moment! Everything is indeed supposed to install in the same folder...
This should however definitely works... I'll try to compile ezc3d for matlab on Windows.
I am not sure what you mean. The Matlab version (and its folder) is not assumed but dynamically found by CMake.
Originally, I was installing in the I have a look a the problems on Windows installation and I come back to you quickly! |
The problem
is now fixed, thanks to PR #198 Thanks for reporting :) |
Thanks for the ezc3d project! I can now load a 90-second C3D file into Matlab in less than 1 second. With the Opensim C3D tools it took about 4 minutes.
I managed to build and install the Matlab MEX binaries using CMake and Visual Studio, and they work fine.
So far, I am assuming that all required DLL files are in the C:/Program FIles/MATLAB/.../toolbox/ezc3d folder. If so, I can simply give that folder to someone else to install the toolbox. Have not tested that yet.
However, it would be better if the toolbox could be installed from within Matlab, using the Add-Ons manager. The ezc3d toolbox is known to the Add-Ons manager, but does not install a functional toolbox. It seems to install the development folder and source code in an Appdata folder. Instead, I think it should just install the binaries, DLLs, and test code in a C:/Program FIles/MATLAB/.../toolbox/ezc3d folder.
Can this be fixed?
The text was updated successfully, but these errors were encountered: