PDA

View Full Version : problem sharing plugins


gtbull80
07-20-2005, 05:45 PM
I've just started writing plugins for maya. Started things of with the infamous helloWorld plugin. then moved my way up to creating a custom node that could access a .wav file and convert it's amplitude as an output. but anyways. when I test the plugins on my machine, they all work for the most part. but more importantly, they actually load. when I try to load my plugins on other machines, I get the following error:
----------------------------------------------------------------------------------
loadPluginCallback "D:/maya plugin test/wavNode.mll" "plug-in";
// Error: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.
//
// Error: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.
(wavNode) //
// Result: 1 //
-------------------------------------------------------------------------------------
what the crap?!?!?! I'm developing plugins for maya 6.5 and I'm using visual studio 2005 beta 2

any help will be greatly appreciated

soopagenius
07-20-2005, 08:57 PM
You might want to check your plug-in's dependencies using depends.exe, (the Visual Studio dll dependency checking tool). Crucial first step for head-scratchers like this one. Did you link in any libraries that that aren't in the system path?

The fact that it works on your machine but not on others suggests a missing dll.

Kevin Atkinson

gtbull80
07-21-2005, 01:32 PM
hey, soopagenius. i'm sitting at a computer that's not mine. i grab my .mll i run depends.exe. And it turns out that i'm missing:

MSVCP80.DLL
MSVCR80.DLL
MSJAVA.DLL

I'm guessing that visual studio somehow creates this dependancy. I don't think I need these files for my plugin to work. can i somehow turn off the dependancy in VS? or are they purposely included for the sheer fact of disabling the ability to share .dlls/.mlls???

by the way, thanks for pointing me in the right direction

soopagenius
07-21-2005, 08:18 PM
The first two are MS implementations of the C run-time libraries, which you can link to statically (Go into project properties under "Code generation" and select a non-dll version of the C runtime libs). I don't know why the Java dll is a dependency. That seems a little odd.

You might want to just link dynamically to the CRT and distribute the dependencies with the plug-in. It'll keep down your plug-in size, and they'll be there for any future plug-ins you write. Nuther possibility still is to link dynamically with a previous version of the CRT, which is probably already on the target machine. For that you have to have an import library for the dll, though.

In any case, it's always good to be aware of your module's dependencies when you deploy. It's not surprising in this case that the dependencies aren't on the target machine, because you're using the latest-and-greatest, hot-off-the-presses versions of the CRT.

Cheers,

Kevin Atkinson

gtbull80
07-22-2005, 05:04 AM
So now I put the CRT dll's into the the same directory as my .mll.
------------------------------------------------------------------------------------
Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
Error: The Side-by-Side configuration information in "c:\documents and settings\kid ibeji\desktop\wavnode\WAVNODE.MLL" contains errors. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem (14001).
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.
--------------------------------------------------------------------------------------

i get the warning on my computer too. since the plugins actually work on my machine, i ignore the warning. i then did some reading. and my problem maybe could have been with my manifest file. VS creates, in my case, wavenode.mll.intermediate.manifest. so i add this to the mll directory and get the same errors. do some more reading. if i'm not mistaken, the naming convention is [apps.mll.manifest]. so i get rid of the intermediate. the depends.exe tells me that the "...wavnode.mll.manifest contains errors". here's what it looks like.

-------------------------------------------------------------------------------------
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
<dependency>
<dependentAssembly>
<assemblyIdentity type='win32' name='Microsoft.VC80.CRT' version='8.0.50110.4380' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
</dependentAssembly>
</dependency>
</assembly>
--------------------------------------------------------------------------------------

sigh. it's tough enough for a newbie to tackle the maya API. now i have to deal wil complier issues. such is life is suppose.

thanks for you time!!!

*Note I don't have MSJAVA.DLL on my comupter and my plugins work fine

soopagenius
07-22-2005, 03:35 PM
Looks like you compiled your dll (mll) with managed extensions for C++. This is not necessary, and probably not desirable, and likely the source of your latest grief. In fact the CLR (the .NET runtime) probably isn't even installed on the target machine, and trust me, it's not worth the grief of attempting an install. Try turning off managed extensions (in project properties, under General), and rebuild.

I tend to steer clear from .NET. I programmed in C# and managed C++ for a couple years, and was initially enthusiastic, but until Longhorn ships (and who knows how long that will be), I won't touch .NET. Plain old honest C++, with all it's warts and newbie gotchas, is what you want for Maya plug-in development.

Good luck,

Kevin Atkinson

gtbull80
07-23-2005, 06:27 AM
As per your suggestion, I ventured into my project settings. Turns out the culprit was a setting that embedded the manifest file into my .mll upon building. Once I turn the setting off, the plugins I compile work fine on other machines. however, a side effect is that now my plugins no longer load on my machine without including the MS CRT files. But you know what? I think I'm willing to live with that.

Anyways the world is a better place because of you.

Thanks a lot!!!

CGTalk Moderation
07-23-2005, 06:27 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.