The problem of building helixQtCmd code in Maya 2012!

The problem of building helixQtCmd code in Maya 2012!

tuyu
Observer Observer
553 Views
3 Replies
Message 1 of 4

The problem of building helixQtCmd code in Maya 2012!

tuyu
Observer
Observer
hi! Is anyone could help the problem:
I'm going to write some plugin with qt in maya2012 in platform vc2008. I accorde the api guide saying to buiding the code in devkit, but not suceess! a error message show above!

-----------------------------------------------------------------------------------
release\helixQtCmd.obj release\moc_helixQtCmd.obj "/LIBPATH:C:/Program Files/Aut
odesk/Maya2012/lib" "C:/Program Files/Autodesk/Maya2012/lib\OpenMaya.lib" "C:/Pr
ogram Files/Autodesk/Maya2012/lib\Foundation.lib" d:\Qt\4.7.1\lib\QtGui4.lib d:\
Qt\4.7.1\lib\QtCore4.lib
Creating library release\helixQtCmd.lib and object release\helixQtCmd.exp
MSVCRT.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16
referenced in function ___tmainCRTStartup
release\helixQtCmd.mll : fatal error LNK1120: 1 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN
\link.EXE"' : return code '0x460'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN
\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN
\nmake.exe"' : return code '0x2'
Stop.

D:\test_qt>
-----------------------------------------------------------------------------------
anyone has meet it before? please give a help! I try it for a long time!
0 Likes
554 Views
3 Replies
Replies (3)
Message 2 of 4

tuyu
Observer
Observer
😞
0 Likes
Message 3 of 4

tuyu
Observer
Observer
somebody help!
0 Likes
Message 4 of 4

tuyu
Observer
Observer
here is a guide to build qt, when i finish building source code, i compile the example
code in maya2012 devekit on the guide teaching! some error show like the answer i ansk for.
------------------------------------------------------------------------------------------
Building Qt 4.7.1 for Maya 2012 on Windows


Overview
--------
Maya uses a customized version of Nokia's Qt libraries. If you want to
write Maya plug-ins which also make use of Qt you will have to build Qt
from the modified source files provided in this directory and link your
plug-ins against those libraries.

qt-adsk-4.7.1.tgz contains the modified Qt source code, in tarred, gzipped
form.

adsk-qt471-patch.txt contains the customizations to the standard Qt source,
in standard patch diff format. You do not need to apply the patch file as
the .tgz file already contains the changes. The patch file is just provided
for informational purposes.

Note that 32-bit and 64-bit versions of Qt cannot coexist in the same
directory tree. If you want both versions installed on the same system then
you will have to configure, build and install Qt twice, using different
installation directories each time.


Install The Nokia Qt SDK
------------------------
Get Nokia's Qt 4.7 SDK from here:

http://get.qt.nokia.com/qtsdk/qt-sdk-win-opensource-2010.05.exe

Run the executable. It will install the SDK into c:\qt\2010.5


Unpack The Archive
------------------
Some common file compression utilities on Windows, like WinZip, have been
known to corrupt some of the filenames in the Qt source archive by
appending '0000644' to the ends of their names.

Cygwin's 'tar' command can unpack the archive without error, so if you have
Cygwin installed on your system use that:

tar xzf qt-adsk-4.7.1.tgz

If you don't have Cygwin then use your favourite archive extraction tool to
unpack the archive, but then check to make sure that none of the filenames
have been corrupted.

For the purposes of these instructions we will assume that the archive has
been unpacked into c:\qt-adsk-4.7.1, so to check for bad filenames you would
do the following:

cd \qt-adsk-4.7.1
dir /s *644

If the commands above find any files ending in '000644' you must remove
those digits before continuing with the build.

Also, make sure that there is a file called 'configure.exe' in the top
directory (e.g. c:\qt-adsk-4.7.1). Some virus checkers don't like
executables named 'configure' so if the file is not present try disabling
your virus checking software and unpack the archive again.


Start Up A Visual Studio 2008 Command Prompt
--------------------------------------------
If Visual Studio 2008 is installed normally then you can find the Visual
Studio Command Prompt in the Windows Start menu, in All Programs ->
Microsoft Visual Studio 2008 -> Visual Studio Tools.

If you are building for 32-bit Maya, select 'Visual Studio 2008 Command
Prompt'.

If you're building for 64-bit Maya, select 'Visual Studio 2008 x64 Win64
Command Prompt'.

In the command prompt window, move into the directory into which the
archive was unpacked:

cd \qt-adsk-4.7.1


Configure
---------
If want both debug and release versions of the libraries, execute the
following command:

configure -debug-and-release -no-qt3support

If you only want release versions of the libraries, execute the following
command:

configure -platform win32-msvc2008 -release -no-qt3support

If you only want debug versions of the libraries, execute the following
command:

configure -platform win32-msvc2008 -debug -no-qt3support

If the command fails to run it may be due, once again, to overzealous virus
checking software. Try renaming configure.exe to cfg.exe then re-run the
command using that. E.g:

cfg -debug-and-release -no-qt3support

When the configuration is complete it should display the following message:

Qt is now configured for building. Just run nmake.
To reconfigure, run nmake confclean and configure.


Build
-----
Rather than using nmake to build Qt, we'll use the 'jom' tool from the
Nokia SDK Tools, since that makes better use of multiple cores.

To start the build, execute the following command:

c:\qt\2010.05\bin\jom


Build The devkit Qt Plug-ins
----------------------------
You can test your Qt installation by building the Qt plug-ins which ship
with Maya's devkit.

Start up a Windows Command Prompt window and set the following environment
variables in it:

set QTDIR=c:\qt-adsk-4.7.1
set PATH=&#xQT;DIR%;&#xSy;stemRoot%\System32
set QMAKESPEC=win32-msvc2008

If you're on a 32-bit system, execute the following command:

call "c:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall" x86

If you're on a 64-bit system but are building plugins for 32-bit Maya,
execute the following command:

call "c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall" x86

If you're on a 64-bit system and are building plugins for 64-bit Maya,
execute the following command:

call "c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall" amd64


If you have write access to Maya's directory tree then you can move into
Maya's devkit/plug-ins directory and build the plug-ins right there:

cd \Program Files\Autodesk\Maya2012\devkit\plug-ins
nmake -f Makefile.qt


If you don't have write access to Maya's directory tree then you will need
to copy Maya's devkit/plug-ins directory somewhere where you do have write
access. E.g:

xcopy /s /i "c:\Program Files\Autodesk\Maya2012\devkit\plug-ins" c:\myPlugins

Move into the copy directory:

cd \myPlugins

Edit the 'qtconfig' file and change the relative paths to Maya's 'lib' and
'include' directories to absolute paths. So this line:

LIBS += -L..\..\lib -lOpenMaya -lFoundation

would be changed to this:

LIBS += -L"c:/Program Files/Autodesk/Maya2012/lib" -lOpenMaya -lFoundation

and this line:

INCLUDEPATH += . ../../include

would be changed to this:

INCLUDEPATH += . "c:/Program Files/Autodesk/Maya2012/include"

You can then use the 'nmake' command to build the plugins:

nmake -f Makefile.qt


The .mll files for the plug-ins will end up in the 'release' sub-directory.

If you want to clean up the intermediate files from the build, move the .mll
and .pdb files out of 'release' and into some place safe, then execute the
following command:

nmake -f Makefile.qt clean
0 Likes