CGTalk > Software > Autodesk Maya > Maya Programming
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 03-24-2013, 12:08 AM   #1
nessus
Frequenter
NeS
Vancouver, Canada
 
Join Date: Oct 2005
Posts: 195
Building Qt in Maya plug-in

I am learning how to access Maya's Qt in my plugin, so I did some digging and conveniently came across this official doc:

http://docs.autodesk.com/MAYAUL/201...tion/index.html

The doc mentioned one example called helixQtCmd, but I am having linking error while trying to build it.

Note that I am under OSX with Xcode if this helps. I followed the steps mentioned in the doc, which is to extract the Qt header from devkit/include and make sure I have write access to it. The confusing part is where to find the Qt lib. The doc states that under both Linux and OSX, there should be a 'lib' folder, but I don't see it anywhere within my Maya installation, instead I could only find Qt* files under '/Applications/Autodesk/maya2013/Maya.app/Contents/MacOS', which I assume they are lib files mentioned in the doc.

Code:
Undefined symbols for architecture x86_64: "qFlagLocation(char const*)", referenced from: HelixQtCmd::doIt(MArgList const&) in helixCmd.bundle-x86_64-master.o "QMetaObject::changeGuard(QObject**, QObject*)", referenced from: QPointer<HelixButton>::operator=(HelixButton*) in helixCmd.bundle-x86_64-master.o "QMetaObject::removeGuard(QObject**)", referenced from: QPointer<HelixButton>::~QPointer() in helixCmd.bundle-x86_64-master.o "QPushButton::QPushButton(QString const&, QWidget*)", referenced from: HelixButton::HelixButton(QString const&, QWidget*) in helixCmd.bundle-x86_64-master.o "QPushButton::~QPushButton()", referenced from: HelixButton::~HelixButton() in helixCmd.bundle-x86_64-master.o "QObject::connect(QObject const*, char const*, QObject const*, char const*, Qt::ConnectionType)", referenced from: HelixQtCmd::doIt(MArgList const&) in helixCmd.bundle-x86_64-master.o "QString::fromAscii_helper(char const*, int)", referenced from: QString::QString(char const*) in helixCmd.bundle-x86_64-master.o "QString::free(QString::Data*)", referenced from: QString::~QString() in helixCmd.bundle-x86_64-master.o "QWidget::showNormal()", referenced from: HelixQtCmd::doIt(MArgList const&) in helixCmd.bundle-x86_64-master.o "QWidget::raise()", referenced from: HelixQtCmd::doIt(MArgList const&) in helixCmd.bundle-x86_64-master.o "vtable for HelixButton", referenced from: HelixButton::HelixButton(QString const&, QWidget*) in helixCmd.bundle-x86_64-master.o NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
 
Old 03-27-2013, 06:43 AM   #2
nessus
Frequenter
NeS
Vancouver, Canada
 
Join Date: Oct 2005
Posts: 195
Never mind, I searched more in the forum and came with the conclusion that building Qt in Maya plugin also requires building Qt from the source code, just like how PyQt/PySide is built. I was under the impression that I could just link the shipped Qt libs from Maya installation.

Now I am curious: why does Maya make us do this 'extra' step? Why can't we just link directly with the shipped Qt libs? Is this due to a technical limitation or due to licensing/legal issues? I am also a Nuke developer, as far as I understand it provides direct PySide access to developers for making native Qt UI for Nuke which doesn't require users to build Qt from the source code. Why can't Maya do the same I wonder?
 
Old 03-27-2013, 10:30 AM   #3
Nyro
Lurking
 
Nyro's Avatar
portfolio
A. D.
Vertex Slinger
Munich, Germany
 
Join Date: Dec 2006
Posts: 1,436
Qt: Probably a licensing issue, perhaps an integration issue (library access via API; that's why we have PyQt)

PyQt: A licensing issue prevents them from supplying it with Maya automatically. Every user has to download it individually.

PySide: No licensing problem, hence its inclusion in Maya 2014
 
Old 03-27-2013, 12:28 PM   #4
zeroeffect
Code Junkie
portfolio
Chris Zurbrigg
Software Developer
Independent
Canada
 
Join Date: Jul 2005
Posts: 216
With 2014 it doesn't look like you will need to compile Qt from source anymore (for C++ plugins). From the docs:

Quote:
Maya uses a customized version of Nokia's Qt framework and ships with its own versions of all the libraries and header files you need to use Qt in your plug-ins. On Linux and OS X the libraries are in Maya's lib directory. On Windows the link libraries are in Maya's lib folder and the DLLs are in Maya's bin folder. On all platforms the header files are shipped as a compressed archive (e.g. qt-4.8.2-64-include.tar.gz) in Maya's include directory. Before doing any Qt plug-in work, uncompress the archive into a directory where you have write permission and be sure to include that directory ahead of any others in your include path.

And, the inclusion of PySide is just awesome!

ChrisZ
 
Old 03-27-2013, 12:28 PM   #5
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,481
Thread automatically closed

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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 08:31 AM.


Powered by vBulletin
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.