PDA

View Full Version : Maya plug-in


Wattana
05-03-2005, 05:05 PM
Hi there all.

I'm new in the c++ code and I have experience in C programming, and MEL scripting.
I'm trying to pass all my scripts to a plugin for Maya.
The matter is that Maya help says to use the Microsoft Visual Studio to implemet any plug-ins... and I donīt want it...

Does anybody know how to implement a very very simple plugin ("Hello World") in a free C++ develop enviroment like Cdev?

Thanks a lot.

FrankFirsching
05-05-2005, 09:37 AM
The reason Alias tells you to use Visual Studio is, that you need to use the microsoft compiler (or the Intel compiler, which is ABI compatible with the microsoft compiler). Maya plugins can't be compiled with a free compiler (e.g. mingw). Those compilers use a differen ABI. ABI stands for Application Binary Interface, and specifies how function arguments are given to subroutines, how C++ name mangling is done, etc. Since the Maya API (Application Programming Interface) is a C++ API, you really have to use a compiler, that performs the same name mangling as the compiler Alias is using to compile Maya.

Ok, back to your original question:
You really don't need to use Visual Studio (the user interface from microsoft). You can even use the command line and compile your plugin from Makefiles (as long as you are using the microsoft compiler). I don't have Maya in front of me right now, but I think in the docs you will find a page, that describes the settings you need for a Maya build environment (e.g. multi-threaded DLL standard runtime library, ...). Setup your cDev to use cl.exe for the compiler and link.exe for the linker and setup the appropriate command line switches for the described build environment. I don't know cDev, so I don't know if it can integrate the microsoft compiler, but if it does, it shouldn't be so difficult.

artifish
05-05-2005, 10:30 AM
If you don't want the development environment if visual c++ you can still just use MS's compiler which is available for free here:
http://msdn.microsoft.com/visualc/vctoolkit2003/

There are a few tutorials out there (google for them) to include the compiler into free development environments like eclipse - maybe there is something similar for cdev.

-- added
just found this link which might be of help
http://www.cgtalk.com/showthread.php?t=227419

Wattana
05-09-2005, 08:10 AM
Hi again. Thanks a lot. I've understood a lot of things now.

I'll try to link the microsoft builders in my C enviroment.

Thanks again. Nice to find a place where find real help.

CGTalk Moderation
05-09-2005, 08:10 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.