-
Notifications
You must be signed in to change notification settings - Fork 165
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 after using compiled mex files (CMake / VS 2015): Invalid MEX-file ... Function mexFunction is missing. #70
Comments
huh. It might be missing the -DMEX flag. I've also updated the cmakelists.txt so this might be fixed now. |
Setup:
I have the same problem. When I compile with Matlab 2017a I get: I think both errors are actually thrown due to the same reason, i.e. that the main-function of the mex-files is not correctly named (see here). I already tried updating gptoolbox to the most recent version, but unfortunately that did not help. What do you mean by
? Do you mean it is a CMake flag that should be set automatically and it would help to set it automatically? If so, then what kind of Flag is it? Boolean? Thank you very much. |
Perhaps this has something to do with the issue: |
I've made a change in 0121b32 that might fix some of these issues. Could you please try cmake, make again? |
Thanks for tackling the problem so fast. Unfortunately, the problem persists for both 2017a and 2018b. |
I'm not a windows user so this is difficult to debug. On Mac/linux I would check that the
and see
Is there a windows way to determine what symbols are ending up in the output? |
VS2015 offers a tool called dumpbin.exe, which should provide what you are asking for. I attached the output of |
Hmm, well this looks like it's not compiling anything in mesh_boolean.cpp.
Are you sure you have the latest version? The first line should be:
#include <igl/copyleft/cgal/mesh_boolean.h>
and _*not*_
#ifdef MEX
|
I just freshly downloaded everything yesterday. The first line is indeed: |
could you try deleting cmake/FindMATLAB.cmake and recreating the vs project
from cmake?
…On Tue, Nov 27, 2018 at 9:28 AM Max Frei ***@***.***> wrote:
I just freshly downloaded everything yesterday. The first line is indeed:
#include <igl/copyleft/cgal/mesh_boolean.h>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#70 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACI0mR-ZtDxFccRnbl5UmqCDNjvcDn3qks5uzUwEgaJpZM4WFpjH>
.
|
Still the same error messages for 2017a as well as 2018a. I attached the new output of dumpbin. |
Same here, after deleting the FindMATLAB.cmake |
I'm still thinking this is an error in the FindMATLAB. I checked in a new version 60ceec3 . Could you please try a fresh cmake? |
Sorry, still the same error: Gateway function is missing. |
OK, we might need somebody with more VS experience. My guess is that this has something to do with the symbol "visibility" settings. MATLAB would like to have all symbols hidden except |
By the way: What compilation preset do you recommend? I always used Release. Is that actually correct? |
@maxfrei750 I always try both release and debug, but release should be fine. By the way, if you only need a specific function of the toolbox, you can try to build it in MATLAB. Check out the attached file: compile_mesh_boolean.zip |
this could potentially be helpful. If the matlab mex command works, could you run it in verbose mode and send the full compilation command that it prints? Then also send the compilation command that VS runs. We could compare the flags. |
Here is the MATLAB log: mesh_boolean_compile_MATLAB.log The VS log will take some minutes. |
(How come you have to comment out those lines in assign_scalar.h? I thought the #ifndef WIN32 would stop them from being compiled on windows already). |
From looking at the log I'm guessing |
Sorry, don't know. I reported it here: libigl/libigl#693 (comment) |
Cmake 1st trial: Cmake 2nd trial after disabling eltopo & embree: Debug in VS2015: |
OK, thanks. Can you try manually adding the |
A more detailed log of a release build:
I will try. |
Wow, that worked. Thanks a lot! |
Awesome. So now I need to figure out how to get this into the cmake... |
Maybe this helps: |
Thanks, could you give this new cmake a try ca64d68 |
Yes, works! |
Now this issue should not be very important anymore. |
great. @maxfrei750 want to also give it a try? |
Finally had the time to test it... and it works! Very nice! Thanks you two! |
@oqilipo I think we can close this issue. |
I''ve created a project for the mex files with CMake 13.12.1 and build it with VS2015 (Win7).
Everything worked fine without errors using Boost 1.67 and CGAL 4.12 and the latest version of libigl.
But when I try to test the compiled mex files I receive the following error:
Any help is appreciated.
Thanks in advance
The text was updated successfully, but these errors were encountered: