I have been working on the api for about 5 weeks and have not been able to compile
helloWorld.cpp in linnux or xp. Is the maya api docs the only available resource–
or is there something more comprehensive availible.
additional maya api compiling documentation ?
Seconding what Segmoria asked.
Regarding compilation on linux, I normally use qmake to generate my makefiles, works excellently for me. I’m perfectly happy to share a basic qmake file that could get you started, but it would be interesting to see what sort of problems you’re experiencing first so we can aim any further comments on a relevant level;)
I am picking up these commands from the maya docs
Linux:
If this is put into a file called helloWorld.cpp it can be compiled with:
g++334 -c -I. -I… -I/usr/aw/maya7.0/include -I/usr/X11R6/include -O3 -pthread -pipe -D_BOOL -DLINUX -DREQUIRE_IOSTREAM -mcpu=pentium4 -Wno-deprecated -fno-gnu-keywords helloCmd.cpp
g++334 -shared -O3 -pthread -pipe -D_BOOL -DLINUX -DREQUIRE_IOSTREAM -mcpu=pentium4 -Wno-deprecated -fno-gnu-keywords -Wl,-Bsymbolic -o helloCmd.so helloCmd.o -L/usr/aw/maya7.0/lib -lOpenMaya -lFoundation
which yields a–sorry, I am not in linnux now–“does not recognize command…” error…
I do not have linnux experience–it just seemed like it was better suited for
development…are these commands --from the maya docs–valid.
Whether or not it’s better suited for development is a touchy issue, though I happen to agree with that;)
the commands are valid yes, the problem seems to be you don’t have g+±334 installed. It could be that you do have g++ installed, see what happens if you type “g++ --version” at a command prompt. If that gives you something like:
carina@ginger-laptop:~$ g++ --version
g++ (GCC) 4.0.3 (Ubuntu 4.0.3-1ubuntu5)
Copyright © 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
it means you have g++ installed. If the version number is 3.3.4 you can simply replace “g+±334” with “g++” and try to compile. If the version number is greater than 4.0 (like mine’s 4.0.3) compiling with g++ will generate a bucketload of errors.
So, if you don’t have g++ installed at all, OR if your version is greater than 4.0, you’ll need to install g++ version 3.3.4. The way you’d go about doing this depends entirely on what linux distribution you’re using…
Hope that helps!
Thanks Carina–
I’ll try that later when I’m rebooted in linnux. Its seems like there is no developers guide to walk someone through these issues–is that right or am I missing something…do people proceed hit or miss or find an experienced delveloper? Obviously the maya docs are not entirely sufficient…
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.