Maya, CGAL, Conflicting libgmp-10.dll

Maya, CGAL, Conflicting libgmp-10.dll

Anonymous
Not applicable
853 Views
1 Reply
Message 1 of 2

Maya, CGAL, Conflicting libgmp-10.dll

Anonymous
Not applicable

Greetings:

I'm attempting to write a deformer plugin with an acceleration structure that makes use of some features from the CGAL library, specifically nD Delaunay Triangulation. I've been able to compile the examples from the library without issue. However, when I attempt to integrate CGAL with my plugin code, I'm running into a DLL conflict. It appears that Maya includes its own versions of libgmp-10.dll and libmpfr-4.dll in the "bin" directory. These conflict with those supplied by the makers of CGAL. When I attempt to use Google Test to verify the function of my plugin classes, and it tries to load OpenMaya.dll, etc. it gets those as well. This causes the CGAL routines to fail out. If I point the debugger at CGAL's dlls first, the Maya DLLs dependent on Autodesk's build of the library fail. Pretty classic DLL Hell, from what I'm reading. I would simple statically link the affected libraries into my build of CGAL, but according to the devs, those two GNU libraries are under LGPL and so that's not an option. I separated the classes using CGAL out to their own library, separate from the plugin, and I can confirm that my tests succeed. So the problem is DLL conflict.

 

My first question for the group at large is there anyone in the community with experience at integrating CGAL into a plugin? If so, how did you go about it and resolve this issue?

 

Second, I notice the "lib" files for the DLLs are missing from the devkit, and Maya install. I thought I might try linking the Maya version of the library with a CGAL build to see if I could get CGAL to work with Maya's build of the library. Unfortunately, with the "libs" there's no way to even attempt it. Does anyone in the group know how to get hold of the library stubs for linking those DLLs from Autodesk?

 

Thanks in advance for your attention and time. Any help you might offer is appreciated.

 

-B

0 Likes
854 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

I work on CGAL, and we have a customer who encounters the very same problem. He uses the GMP that we distribute with CGAL, and when using the plugin inside Maya it uses the GMP dll shipped with Maya.

 

So I guess the users has to use the same version of GMP that Autodesk uses, and I am wondering if the GMP which can be downloaded from this page is the correct one.