Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® Mudbox™ / Community Help / Turntable Plug-in source code compiled and linked doesn't work using Qt 4.6.2 moc compiler on VS2008 Pro x32
  RSS 2.0 ATOM  

Turntable Plug-in source code compiled and linked doesn't work using Qt 4.6.2 moc compiler on VS2008 Pro x32
Rate this thread
 
40193
 
Permlink of this thread  
avatar
  • Location: Singapore
  • Total Posts: 13
  • Joined: 19 September 2006 06:34 AM

Hi skycastleMud/Wayne,

I’m trying to compile your source code Turntable and I have some issues.  I’m using VS2008 Professional Edition x86. Qt 4.6.2 with moc compiler and OS is Windows XP Pro x64.  I managed to setup successfully in VS2008. I used the QtCore4.lib and QtGui4.lib from Qt 4.6.2 because it will have a problem if I used Mudbox 2010 SDK.  I compiled the TurntableDialog.h using moc and changed it to moc_TurntableDialog.cpp. I add this to the Generated Files folder.  I don’t have any problem in compiling and linking.  I managed to create the Turntable.mp file.  I add this in the plugin folder of Mudbox.  I open Mudbox 2010 32bit and see the Plug-ins/Turntable Movie.  But after I clicked the Turntable Movie I encountered a problem. A window pop-up with these messages"An unknown error has occurred while performing the operation. We are sorry for the inconvenience.” I attached the zipped file that contains Qt 4.6.2 moc compiler, moc_TurntableDialog.cpp and Turntable.mp for references. Need your help with this problem. I think it would be better if you can provide a step-by-step procedure on how to configure in Visual Studio 2008 x32 and x64 the files, paths, libraries that is needed for the compiler and linker for 32bit and 64bit plug-ins. Also how to compile the header files in Qt moc compiler. What should be the proper version to use. So that any user who wants to create a plug-in will have no problem.  Thanks in advance.



Attachment Attachment
Replies: 1
/userdata/avatar/770buc63m_IanAvatar3.jpg

You may need to use Qt 4.5.2 instead of Qt 4.6.2

Author: Ian Ameline

Replied: 03 March 2010 05:50 AM  
avatar

Yup you’re right. There is a bug in Qt 4.6.2 moc compiler when it creates a meta file for QMetaObject. I managed to fix the problem. You can still use the Qt 4.6.2 moc compiler but you have to change the following from the moc_TurntableDialog.cpp. See below.

1) Change revision from 4 to 2 and methods from 14 to 12.
QT_BEGIN_MOC_NAMESPACE
static const uint qt_meta_data_TurntableDialog[] = {

// content:
2, // revision changed from 4 to 2
0, // classname
0, 0, // classinfo
1, 12, // methods changed from 14 to 12
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors

// slots: signature, parameters, type, tag, flags
17, 16, 16, 16, 0x0a,

0 // eod
};

2) Commented these lines :

/ * #ifdef Q_NO_DATA_RELOCATION
const QMetaObject &TurntableDialog::getStaticMetaObject() { return staticMetaObject; }
#endif //Q_NO_DATA_RELOCATION */

3) Changed these lines :
const QMetaObject *TurntableDialog::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
}

To these lines :
const QMetaObject *TurntableDialog::metaObject() const
{
return &staticMetaObject;
}

That’s all.



Replies: 0