-
Notifications
You must be signed in to change notification settings - Fork 5
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
ERROR Invalid MEX-file - Yarp MatLab bindings on MATLAB R2020b #58
Comments
@giovannipizzolante used this commit: 76c5ad9 |
probably some matlab users know how to solve the problem (@gabrielenava @Giulero @traversaro @CarlottaSartore @lrapetti ) |
"Gateway function is missing" is typically due to some visibility problem, see for example robotology/blockfactory#4 . I guess you are not able to use any other YARP function, is this correct? Probably the FindMatlab.cmake file vendored in this repo needs to be updated to support MATLAB R2020b, if something changed in how MATLAB handles this kind of stuff. |
Can you try with the branch |
Yes, correct.
|
After switching, did you configured and installed again the project? |
Can you also zip and attach the |
yes we did it |
Yes, thanks |
Indeed, I opened the file that you sent me with https://github.com/lucasg/Dependencies and it does not provide the Why this symbol is missing? I don't know. For sure it is defined in https://raw.githubusercontent.com/robotology/yarp-matlab-bindings/master/matlab/autogenerated/yarpMATLAB_wrap.cxx, in the line: extern "C"
void mexFunction(int resc, mxArray *resv[], int argc, const mxArray *argv[]) {
/* Initialize module if first call */
SWIG_Matlab_LoadModule();
if (--argc < 0 || !mxIsDouble(*argv) || mxGetNumberOfElements(*argv)!=1)
mexErrMsgTxt("This mex file should only be called from inside the .m files generated by SWIG. First input should be the function ID .");
int fcn_id = (int)mxGetScalar(*argv++);
int flag=0;
switch (fcn_id) {
case 0: flag=swigConstant(resc,resv,argc Then, the function should be exposed by this line: https://github.com/robotology/yarp-matlab-bindings/pull/59/files#diff-cb32ba047867abd4f1772a5add0b5b00c0bc47cd97334e113710fca7b76aba24R1119 , that passes to the linker the |
Hi @traversaro , I just opened the terminal, and I navigated into the folder This is the output:
|
Exactly, thanks! |
The relevant line is:
This is the command with which the compiler and the linker (if you don't know what this are, see https://github.com/green7ea/cpp-compilation). Indeed, there is no |
Yes, I was on master. I run cmake again into the branch
|
Thanks! I think we found the problem: the
|
No, I did not. I just opened the terminal, went here Should I do this
before running Thanks @traversaro ! |
Yes. As we changed the CMake files used in the project, it is a good idea to manually run |
Here what I did :
|
Can you delete |
Ok, still no |
I think I understood the problem. I had exactly the same problem in robotology/idyntree#790 : the |
This issue should be fixed by #60 . Can you try it @giovannipizzolante ? To install after compilation, remember tor run |
Hi @traversaro , I have tried and #60 fix the problem. Anyway, when I try to go on for checking the installation, as suggested here, when I type
|
Great! In this case, I would kindly ask to approve the PR #60 (see https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/approving-a-pull-request-with-required-reviews on how to approve a PR) so that we can merge it and close this issue.
Can I ask to open a separate issue for this? I know that it may seem a bit useless, but when managing several software projects, it is convenient to use to have issue that are as small as possible, so that we can clearly know which problems have been solved and which instead still needs to be solved. Thanks! |
Fixed by #60 . |
Following the guide, I have installed the yarp matlab bindings. When running the
yarpVec = yarp.Vector();
the following error is showed :I am using MatLab 2020b on Windows and I compiled all by using Visual Studio 2019.
The text was updated successfully, but these errors were encountered: