Configuring Eclipse to compile Maya Plugins

Hi all, i just managed (finally!) to compile a custom plugin i developed for Maya using Eclipse ad IDE and the proper gcc compiler (4.2.1) supported by maya.

First of all we need to compile gcc for our distribution. I did it using this guide i wrote a while ago. I’m using Ubuntu 14.04, Eclipse Kepler (manually installed) and CDT plugin.

I started making an Empty C++ Project.

1 - project

The next step is to setup the project properties. In the C/C++ Build – Settings panel set the gcc command.
Remeber to put “All configurations” whenever the panel shows the option!
If you followed my guide about compiling gcc 4.1.2 simply put:


2 - c++ Build - Settings Compiler

In the Preprocessor panel add these symbols:



2 - c++ Build - Settings

Then we have to set some include path:


2 - c++ Build - Settings 02

Set the Other flags in the Miscellaneous:

-c -fmessage-length=0 -m64 -pthread -pipe -Wno-deprecated -fno-gnu-keywords

2 - c++ Build - Settings 03

And then the linker settings. Add these libraries in the Libraries section:

OpenMaya OpenMayaAnim OpenMayaUI OpenMayaFX OpenMayaRender Image Foundation

and this path to the library search path:


3 - Linker - Libraries

add some additional Linker flags specified in the autodesk guide:

-m64 -O3 -pthread -pipe -D_BOOL -DLINUX -DREQUIRE_IOSTREAM -fno-gnu-keywords -Wl,-Bsymbolic

3 - Linker - Misc

And also a tick on Shared and this string on the Shared object name:


3 - Linker - Shared Linrary Settings

2 Responses

  1. hey,
    thanks for this but i have a problem when compiling and i have tried everything but can’t figure it out. Whenever I build the project, i always get this error make: *** [“nodeName”] Error 1

    I am on Linux and I have gcc/g++ compiler installed as well. But i dont know why its not working. Let me know if you have any idea.

    Thank you.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.