Custom .mll won't load for other users

Custom .mll won't load for other users

Anonymous
Not applicable
1,588 Views
6 Replies
Message 1 of 7

Custom .mll won't load for other users

Anonymous
Not applicable

I dipped my toe in custom C++ plugin development by modifying Maya's ObjExporter plugin from the DevKit.  I have it running perfectly on 2016.5 & 2017 on my personal machine.  But when I tried to load the plugin on another users machine I get the following error:

 

 

import maya.cmds as cmds

cmds.loadPlugin("vObjExport.mll",quiet=1)

# Error: Unable to dynamically load : O:/Assets/Animation_Share/VISMO_Tools/Maya/2016.5/Modules/vOBJExporter/plug-ins/vObjExport.mll
The specified module could not be found.
 # 
# Error: The specified module could not be found.
 (vObjExport) # 

 

I'm using .mod files to direct Maya to a networked path where I keep shared materials.  But I also tried putting the .mll in a local location and loaded it manually.  But I still get the same error.  At this point I'm at a loss as to why it works for me but not for other users.  Maya clearly can see the plugin path.

 

image.png

 

Thanks!

 

James

 

0 Likes
Accepted solutions (1)
1,589 Views
6 Replies
Replies (6)
Message 2 of 7

cheng_xi_li
Autodesk Support
Autodesk Support

Hi,

 

My guess would be missing dlls on client machine. Usually VCRuntime I think. Dependency walker is quite useful at this time to figure out which dll is missing on the client.

 

Yours,

Li

0 Likes
Message 3 of 7

Anonymous
Not applicable

Thanks for the response Li.

 

I downloaded the Dependency walker but I honestly don't know what to do with it.  I also don't get why this would effect my plugin.  Isn't the concept of compiling the .mll essentially putting everything Maya needs into that file?  Otherwise how would you distribute it if you also have to make sure everyone has the same .dll's that you have?

0 Likes
Message 4 of 7

Anonymous
Not applicable

OK, so I went and installed Visual Studio 2017 on a few machines where my plugin couldn't run.  Once I did that those machines were able to load the plugin without issue.  So now my question is, what component does VS install that allows the plugin to load?  Again I've tried the Dependency walker but I'm not really sure what I'm looking for with that.

0 Likes
Message 5 of 7

Anonymous
Not applicable
Accepted solution

OK I figured out what was going on.  I was building in "Debug" mode.  Once I switched to "Release" mode everything worked as it should.  So mark it up to a C++ Newbie mistake!!

 

Thanks!

 

James

0 Likes
Message 6 of 7

cheng_xi_li
Autodesk Support
Autodesk Support

Hi,

 

Good to know you've solved your issue.

 

Like I thought, it's vc runtime dll missing. Switching from debug to release will use release runtime libraries. They should be install with Maya 2016.5/2017(VS2012). 

 

So, what is dependency walker for?

 

If you load a dll file in dependency walker, check at the module tab. If you found some essential dlls are missing on the client computer, you might want to create an installation package with those dlls or writing an instruction for users.

 

depends.png

 

For example, the picture above suggests that OpenJP2.dll is missing, so I'll need to provide it to the client.

 

Yours,

Li

 

 

 

 

0 Likes
Message 7 of 7

Anonymous
Not applicable

Oh excellent thank you!  I was having trouble finding a guide on how to use it.

0 Likes