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.
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:
In the Preprocessor panel add these symbols:
REQUIRE_IOSTREAM LINUX _BOOL
Then we have to set some include path:
. .. /usr/autodesk/maya/include
Set the Other flags in the Miscellaneous:
-c -fmessage-length=0 -m64 -pthread -pipe -Wno-deprecated -fno-gnu-keywords
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:
add some additional Linker flags specified in the autodesk guide:
-m64 -O3 -pthread -pipe -D_BOOL -DLINUX -DREQUIRE_IOSTREAM -fno-gnu-keywords -Wl,-Bsymbolic
And also a tick on Shared and this string on the Shared object name: