PDA

View Full Version : creating a hello world c++ app for maya 2010


MegaManZZ
12-28-2009, 07:25 PM
I want to get started learning some some maya c++ API, but im about to start going crazy trying to figure out why i can't get a simple hello world program to appear. I'm using 'Maya 2010' 64bit running 'windows 7'. I've never been able to get the "Maya Plug in Wizard" to show up in both 'visual studio 2008' and 'visual c++'. I've done a ton of research with little luck. can't get the built in hello world app to compile and run properly.

It's a little hard to detail a specific problem since nothing is really working, but ill try my best. If I try to run the 'hello world' app from "Autodesk\Maya2010\devkit\applications" the start debugging button is greyed out and if i go to 'rebuild solution' i get
Rebuild All: 0 succeeded, 0 failed, 1 skipped

as i said earlier i can't get the "Maya Plug in Wizard" to show up.. I've followed the steps in the 'MayaWizardReadme.txt', with no luck. I've multiple site suggestions on how to build it manually with no luck.

If someone can help me through this barrier i would be very very grateful.
Plz and thank you!

MegaManZZ
12-28-2009, 08:30 PM
so when running:
C:\Program Files\Autodesk\Maya2010\devkit\applications\helloworld.sln
i managed to get the 'start debugging' button from being greyed out. What i did was change the platform drop-down in the configuration manager form x64 to win32.
the weird thing was that when i click the drop-down the only option i had was 'Win32'. so i was not able to change it back to x64.
now that the button is not greyed out i clicked it and recieved 1 error.
fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'

i then decided to change : Configuration Manager > Linker > Target machine: from 'MachineX86' to 'MachineX64' and received this error instead:
fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'

I am noob when it comes to this stuff. So what im saying might not make sense but i hope its helpful.

norbertnacu
12-29-2009, 01:16 AM
Hi There,
Would you consider using Maya Plug-in Wizard?


http://www.creativecrash.com/maya/downloads/scripts-plugins/utility-external/misc/c/maya-plugin-wizard-for-vs2005-vs2008

Download (http://forums.cgsociety.org/attachment.php?attachmentid=149017)

Hope that helps,
Norbert Nacu

MegaManZZ
12-29-2009, 03:30 AM
tried that before, but couldn't get it to work????
ill give some detail. first off i can't do step 2 because i don't have a
C:\Program Files (x86)\Microsoft Visual Studio 8\VC
directory. but i do have a 'C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC' directory so i put the files in the appropriate folder there.
step three has a similar situation as step 2:
step 4 is where im really stuck and would love some help!!
in step 4 I can't find the "MayaPluginWizard" option.. its just not there under 'visual c++ projects'

so im stuck on step 4.. :(

norbertnacu
12-29-2009, 05:07 AM
Hi MegaManZZ,
I'm gonna do everything from scratch with you :)

1. Unzip MayaPluginWizard2.0.rar
2. Copy these files:
MayaPluginWizard.vsdir
MayaPluginWizard.vsz
MayaPluginWizard.ico


Here:
C:\Program Files\Microsoft Visual Studio 9.0\VC\vcprojects

3. Copy this folder:
MayaPluginWizard

Here:
C:\Program Files\Microsoft Visual Studio 9.0\VC\VCWizards

4. Edit this file:
C:\Program Files\Microsoft Visual Studio 9.0\VC\vcprojects\MayaPluginWizard.vsz


Wizard=VsWizard.VsWizardEngine.8.0
to
Wizard=VsWizard.VsWizardEngine.9.0


http://www.creativecrash.com/system/photos/000/063/205/63205/big/vs2009.jpg?1254843055

5. Start Microsoft VS 2008 and invoke File -> New -> Project -> Visual C++ Projects and select MayaPluginWizard.

6. Enter a name and solution name and select the OK button.
http://www.creativecrash.com/system/photos/000/063/204/63204/big/PluginWizard.jpg?1254843051

7. Fill in the information for the "Plug-in setup" screen and then select the "Plug-in type" and "Included libraries" links to also enter the required information.

8. The project will be created and then the solution can updated and built.

9. Change 32x to 64x:
http://www.creativecrash.com/system/photos/000/063/206/63206/big/x64_1.jpg?1254843057

http://www.creativecrash.com/system/photos/000/063/207/63207/big/x64_2.jpg?1254843060

http://www.creativecrash.com/system/photos/000/063/208/63208/big/x64_3.jpg?1254843062

http://www.creativecrash.com/system/photos/000/063/209/63209/big/x64_4.jpg?1254843063


Hope this helps,
Norbert Nacu

Buexe
12-29-2009, 07:35 AM
If I may say something obvious... make sure you ticked the 64bit options for C++ (default is off) when you installed Visual Studio, otherwise compiling for 64bit is kind of hard.

MegaManZZ
12-29-2009, 11:52 AM
Buexe - I don't remember ticking anything of the sort.. is it possible to tick it after installation?
I'm going to try to get it working shortly..
thank you very much for helping me out. very very appreciated!

MegaManZZ
12-29-2009, 12:16 PM
I'm following the steps and I'm just going to post anything that might seem strange that might lead to a conclusion of the problem I'm having. Please note that I don't remember ticking any x64 options during installation. Nor do I remember seeing anything.
First i don't have the directory "C:\Program Files\Microsoft Visual Studio 9.0\VC\vcprojects" ,but i do have a "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcprojects".
Same goes for "C:\Program Files\Microsoft Visual Studio 9.0\VC\VCWizards".

For step 3 do you copy the "MayaPluginWizard" folder or the "MayaPluginWizard2.0" folder.
In the documentation it says to copy the "MayaPluginWizard2.0" since it is the outer folder which contains another folder called "MayaPluginWizard". I tried both.

I'm stuck on step 5 since i don't see a "MayaPluginWizard". Going to try Buexe's suggestion of ticking the 64bit option which i don't remember seeing, but might become more aware of it this time. Re-installing VC++..............

MegaManZZ
12-29-2009, 12:28 PM
Once again to keep my posts updated.
I'm reinstalling VC++ and noticed that after I clicked 'repair' it asked me if i had a "VC++ service pack 1 cd" which i answered 'no' and it went of to download the service pack. I mention this, because when first installing VC++ i don't remember seeing that option. This might have been because i had windows validation issues earlier which i got fixed last night, or it might just be because that option only appears when "repairing" VC++..(this might fix bug)..

(edit)
NOPE

MegaManZZ
12-29-2009, 02:19 PM
Alright so here are the steps I took. going to try to be as clear as possible in hopes of someone finding out what i did wrong.. And i really hope someone can, as I fear for my sanity.

- un-installed everything except Maya 2010(64bit)
- running Windows 7 64bit
- installed .NET Framework 2.0 Software Development Kit (SDK) (x64) (http://www.microsoft.com/downloads/details.aspx?familyid=1AEF6FCE-6E06-4B66-AFE4-9AAD3C835D3D&displaylang=en)
- installed Visual C++ 2008 Express (http://www.microsoft.com/Express/VC/) (checked the 64bit option)
- updated via: start > All programs > Windows Update
-followed norbertnacu's extremely clear steps. (used "C:\Program Files(x86)\Microsoft Visual Studio 9.0" folder, instead of "C:\Program Files\Microsoft Visual Studio 9.0" folder which did not have the appropriate sub folders.
(edit)tried also placing files in the proper path by creating the appropriate directories)
-when reaching norbertnacu's fifth step I am stuck as I cannot find "MayaPluginWizard".

cbamber85
12-29-2009, 09:16 PM
Where have you put the MayaPluginWizard.ico, MayaPluginWizard.vsdir and MayaPluginWizard.vsz files? They should be in C:\Program Files\Microsoft Visual Studio 9.0\VC\vcprojects. Also show us the contents of MayaPluginWizard.vsz.

MegaManZZ
12-30-2009, 02:46 AM
Where have you put the MayaPluginWizard.ico, MayaPluginWizard.vsdir and MayaPluginWizard.vsz files? They should be in C:\Program Files\Microsoft Visual Studio 9.0\VC\vcprojects. Also show us the contents of MayaPluginWizard.vsz.

my 'MayaPluginWizard.vsz'contains
VSWIZARD 7.0
Wizard=VsWizard.VsWizardEngine.9.0
Param="WIZARD_NAME = MayaPlugInWizard"
Param="RELATIVE_PATH = VCWizards"
Param="WIZARD_UI = TRUE"
Param="WIZARD_ID = 345"
Param="FALLBACK_LCID = 1033"


I placed the files in
"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcprojects"

norbertnacu
12-30-2009, 07:10 AM
Hi MegaManZZ,
My OS is Windows Vista. I'm using Maya 2010 32x and VS 2008 to compile my plug-in, but that plug-in wizard should work fine, because I use that at work and we're using Maya 2010 64x. Can you log-in as Admin [login: administrator pass:] in your computer and try doing those steps again? If that doesn't work, then I'm not sure how to fix your problem...hmmm could be Windows 7 or vs 2008 express?

Please read this:
http://chiragrdarji.wordpress.com/2008/05/06/missing-templates-in-visual-studio-installed-templates/


Hope this helps,
Norbert Nacu

MegaManZZ
12-30-2009, 02:14 PM
just updating that i attempted to load everything as Admin. NO luck.. This is getting a little bit ridiculous. I couldn't get the method explained at:
http://chiragrdarji.wordpress.com/2...lled-templates/
to work. I'm getting the error message:
`devenv` is not recognized as an internal or external command, operable program or batch file.
I'm having a feeling that im not installing something right..
Should I have install .NET 32bit?

theflash
12-30-2009, 03:53 PM
I believe visual studio express has different paths for installing wizards. I did my hello world manually on VS express after Maya's wizard didn't work (Havent tried the H3D one). There was a pdf explaining how to setup a project manually to work with maya. It showed how to link and include maya libraries etc. I will post the pdf link if I find it.

edit:
http://www.danielloran.com/study/mp/VisualStudio2005SetUpForMayaAPI.pdf

Buexe
12-30-2009, 04:46 PM
What I dont understand is that there is a hello world project in the devkit > applications folder. So why not build on top of that? I find myself not using a wizard when creating a new API project but rather modify existing ones if I dont have a template for that sort of thing already.

cbamber85
12-30-2009, 07:32 PM
My vsz file:VSWIZARD 7.0
Wizard=VsWizard.VsWizardEngine.9.0

Param="WIZARD_NAME = MayaPluginWizard"
Param="FALLBACK_LCID = 1033"
My vsdir file: MayaPluginWizard.vsz| |MayaPluginWizard|1|Maya 2009 Plugin Wizard| |6777| |MayaPluginWizard
Probably not significant, but if you're desperate it'll be worth a shot.

Maya's plugin wizard hasn't been updated for years, but I've managed to get them working fine for that last few years on different architectures with little modification. If you're having this many problems, there's probably something more serious wrong.

furn
01-05-2010, 11:09 AM
wow...

a hacked pluginsWizard?

my maya2010 's devkit still has pluginsWizard 2.0 for 2008 :(

but the wizard form highend3d support maya 7 ~ 2010 !?!



thanks alot~

ganzo
03-19-2010, 07:18 AM
heh....just ran into this while searching for a newer version for pluginwizard since I'm using 2009 x64 with VS 2008...worked like a charm.....good stuff!

jschieck
03-25-2010, 03:20 PM
for anyone still wondering about how to get this to work with Microsoft Visual C++ 20** Express Edition:

Rather than copying to:
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\VCWizards
and
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcprojects


Copy to:
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Express\VCWizards
and
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Express\VCProjects

after that it should show up when you make a new project

SreckoM
11-17-2010, 02:56 PM
Does anyone uses VS 2010 Express for creating Maya plugins?

BTW Maya plugin wiazrd do not work with 2010 Express. It always fails to create new project.

ruchitinfushion
11-18-2010, 03:38 AM
Srecko>>>Does anyone uses VS 2010 Express for creating Maya plugins?

BTW Maya plugin wiazrd do not work with 2010 Express. It always fails to create new project.

Yup i m using MS VC++ 2010 express for creating Maya plug-in for Maya 2011 x64 on WIN XP 64.And you can Kick on ass of Maya plug in wizard template for visual studio.Just try to start with empty project & link all manually.

Note:
*If you are using MS VC++ 2010 express for 64bit App then install this Microsoft Windows SDK for Windows 7 and .NET Framework 4 (http://www.microsoft.com/downloads/en/details.aspx?FamilyID=6b6c21d2-2006-4afa-9702-529fa782d63b&displaylang=en) And in project property>>Configuration Properties>>General>>Platform Toolset to Windows 7.1 SDK.

CGTalk Moderation
11-18-2010, 03:38 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.