CGTalk > Software > Autodesk Maya > Maya Programming
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 03-29-2011, 06:24 AM   #1
sethfair
Veteran
 
sethfair's Avatar
portfolio
Seth Fair
3D Artist/Owner
3D Character Factory
St Paul, USA
 
Join Date: Feb 2008
Posts: 65
compiling maya plugin in eclipse?

Hi, i'd like to use the eclipse IDE to develop my plugins and compile for Maya. There is no plugin wizard to get the environment setup. What environment variables do I need to set to get this to work? Has anyone done this before?

Thanks.
Seth
__________________
www.sethfair.com
 
Old 03-29-2011, 02:56 PM   #2
ThePistolPete
Veteran
Peter N.
Technical Artist
Berlin, Germany
 
Join Date: Jul 2007
Posts: 56
I think it is not possible to compile Maya C++ Plugins with Eclipse. The reason behind this, is that you will need a Microsoft C++ Compiler to get this. The CDT Eclipse Plugin doesn't not support a working Microsoft Visual Studio toolchain, it uses open C++ compiler (eg. MinGW ) instead. There are several projects to get Microsoft compiler in Eclipse to work, but as far as I know far away from a working solution.

I don't know, if there is an "under the hood" solution, but if, I would strongly interested in.

You can use Eclipse for MEL and Python (API) development. This works fine.

There are some free Microsoft Visual Studio Editions (Express), as an alternative to expensive Microsoft compiler. I think you can use these with Maya API without difficulty. Microsoft bring their own IDE with the free VS Edition, but you can use Codeblocks alternatively.

http://www.codeblocks.org/
 
Old 03-29-2011, 03:19 PM   #3
sethfair
Veteran
 
sethfair's Avatar
portfolio
Seth Fair
3D Artist/Owner
3D Character Factory
St Paul, USA
 
Join Date: Feb 2008
Posts: 65
Thanks ThePistolPete. Have you used Codeblocks? If it works with that application, I don't see why eclipse can't be used either as an alternative to compiling plugins. Im on a mac and have XCode, but would prefer to work in an enviroment that is cross platform. I can install eclipse on both windows and mac environments, and its free.

If all is needed is to configure the compiler in a way to find the include files and add certain flags, I don't see why this won't work. Unfortunately, I have had a hard time trying to find what needs to be configured since all the talk is about "use the plugin wizard" for visual studios or use XCode. I'd like to know what is happening under the hood. I know its not magic!
__________________
www.sethfair.com
 
Old 03-29-2011, 04:18 PM   #4
ThePistolPete
Veteran
Peter N.
Technical Artist
Berlin, Germany
 
Join Date: Jul 2007
Posts: 56
Yes, I have used Codeblocks to compile Maya Plugins successfully . The difference between Codeblocks and Eclipse is, that Codeblocks is supporting a lot of different compiler, what CDT for Ecpilse doesn't. You can setup Codeblocks using Microsoft Compiler very easily.

On Windows I had no success the get another compiler beside Microsoft VC working. The problem is not just finding the right includes and libs, the problem is that the Maya API (on Windows) will need additional includes and libs, which are provided by Microsoft. Other packaged like MinGW does prividing some, I think not all, of these libs and includes too, but it seems to be not compatible with the Maya API.

I searched the web and asking some developers, but everybody is referencing to Visual Studio and the plugin wizard. Does any of this look familiar to you? Yes, I also want to know how things working under the hood, so I decided and like to use "outsider solutions". Now I am working with the free VS Edition within Codeblocks, it also supports 64Bit compiling. This works very well, on simple projects at the moment.

I would prefer coding with Ecplise too, because I like to use the same IDE for MEL, Python and C++. I hope CDT will become more flexible in the future.

I have no idea to get this on Mac working, I am not a Mac user, sorry.
Is CDT using the same compiler like XCode? I think CDT is just supporting the MacOSX GCC, does XCode also using gcc for Mac? Is this compiler compatible to Maya's API? Did you setup the MacOS toolchain in the toolchain editor of CDT?

After recognising that CDT isn't really usable with Microsoft VS, I didn't spend a lot of time with C++ Development in Eclipse, so I am not very familar with CDT itself. But I will have a look at CDT later this day ... perhaps I will find any idea.

Peter
 
Old 03-29-2011, 04:30 PM   #5
Keilun
Expert
Keilun
Canada
 
Join Date: Aug 2005
Posts: 738
I posted the list of compile/link params a while back in this thread:

http://forums.cgsociety.org/showpos...945&postcount=7

This was for Maya 2009, but I'm fairly certain it's the same apart from specifying the respective Maya directories and VC compiler directories to your Maya version. I'm not familiar with the Eclipse IDE, so I can't comment on that stuff.

Hope this helps.
 
Old 04-02-2011, 06:48 PM   #6
sethfair
Veteran
 
sethfair's Avatar
portfolio
Seth Fair
3D Artist/Owner
3D Character Factory
St Paul, USA
 
Join Date: Feb 2008
Posts: 65
I ran across a post somewhere that Xcode and Eclipse will run the same compiler on OSX. If this is the case, there should be no reason why you can't get it to work in Eclipse. I tried it out and included all the proper libraries in eclipse and am compiling against gcc 4.0.0 but am still running into problems.

/Applications/Autodesk/maya2011/devkit/include/maya/MTypes.h:235: error: redeclaration of C++ built-in type ‘bool’
/Applications/Autodesk/maya2011/devkit/include/maya/MTypes.h:239: error: expected identifier before ‘false’
/Applications/Autodesk/maya2011/devkit/include/maya/MTypes.h:239: error: expected `}’ before ‘false’
/Applications/Autodesk/maya2011/devkit/include/maya/MTypes.h:239: error: expected unqualified-id before ‘false’
/Applications/Autodesk/maya2011/devkit/include/maya/MTypes.h:239: error: expected declaration before ‘}’ token

Has anyone tried this as well?
__________________
www.sethfair.com
 
Old 04-02-2011, 09:01 PM   #7
ThePistolPete
Veteran
Peter N.
Technical Artist
Berlin, Germany
 
Join Date: Jul 2007
Posts: 56
I've read that Maya for MacOS was compiled with gcc, it should work with Eclipse on Mac.

Maybe gcc 4.0.0 is the wrong version. Maya 8.5 for Mac was compiled with gcc 4.0.2 (can be found in the docs), I think Maya 2011 was compiled with a newer version. On Linux it is gcc version 4.1.2, but i can not find any information what gcc version was used for Maya 2011 for MacOS, just Xcode 3.1.2!

Last edited by ThePistolPete : 04-02-2011 at 09:07 PM.
 
Old 04-02-2011, 09:01 PM   #8
CGTalk Moderation
Expert
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,478
Thread automatically closed

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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 04:12 AM.


Powered by vBulletin
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.