alicevision / MeshroomMaya

Photomodeling plugin for Maya
http://alicevision.org
Mozilla Public License 2.0
139 stars 36 forks source link

Fix windows build error #195

Open RDelet opened 5 years ago

RDelet commented 5 years ago

Hi,

I managed to build the solution on windows with VisualStudio 15 2017. But for that I fix few probleme in code.

1. MeshroomMaya\src\meshroomMaya\qt\QmlInstantCoding.cpp include unistd.h doesn't exist on windows. This include is use juste for usleep function. I replace usleep(100) by Sleep(1) and comment #include

2. MeshroomMaya\src\meshroomMaya\qt\MVGCameraSetWrapper.hpp On windows I have some error with ulong. Before include I add this line

undef ulong

typedef unsigned long ulong;

3 . MeshroomMaya\src\meshroomMaya\qt\MVGProjectWrapper.cpp In function setCamerasNear I have a same problem with ulong Before function I add this line

undef near

undef far

With this correction I have MeshroomMaya.mll But when I load plugin on maya I have this error.

// Error: file: C:/Program Files/Autodesk/Maya2018/scripts/others/pluginWin.mel line 909: Unable to dynamically load : PATH/TO/meshroomMaya/Release/meshroomMaya.mll

Anyone have an idea ?

akuzminykh commented 4 years ago

I had the same problem and it was because the .mll was missing some .dll. You can check what .dll are missing with Dependencies. Keep in mind that you need to put the .dll somewhere where they can be found by the .mll or put the directories of the .dll in the PATH environment variable.