hkrn / MMDAI

[DEVELOPMENT HAS BEEN DISCONTINUED] The successor of MMDAI is https://github.com/hkrn/nanoem / MMDAI was a fork project of MMDAgent and VPVM a.k.a. MMDAI2 was an application to create a motion compatible with MMD for OSX/Linux that is extended from MMDAI
126 stars 28 forks source link

problem building QMA #16

Closed mameisam closed 13 years ago

mameisam commented 13 years ago

install.md is a bit unclear about building QMA and QMA2. First, there is a typo in

QMA をビルド

$ cd .. $ qmake $ make # MacOSX の場合は xcodebuild

cd .. should be cd ../QMA, perhaps?

Doing that, however, results in an error:

maxim@sal:~/h/MMDAIM/QMA$ qmake maxim@sal:~/h/MMDAIM/QMA$ make g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQTSHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4 -I/usr/include -I/usr/local/include -I/usr/include/bullet -I/usr/local/include/bullet -I/usr/X11R6/include -I. -o main.o main.cc In file included from main.cc:49: QMAWindow.h:60: error: ISO C++ forbids declaration of ‘QApplication’ with no type QMAWindow.h:61: error: ISO C++ forbids declaration of ‘QApplication’ with no type QMAWindow.h: In constructor ‘QMAApplication::QMAApplication(int&, char*)’: QMAWindow.h:56: error: class ‘QMAApplication’ does not have any field named ‘QApplication’ QMAWindow.h:56: error: no matching function for call to ‘QApplication::QApplication()’ /usr/include/qt4/QtGui/qapplication.h:375: note: candidates are: QApplication::QApplication(const QApplication&) /usr/include/qt4/QtGui/qapplication.h:131: note: QApplication::QApplication(Display, int&, char**, Qt::HANDLE, Qt::HANDLE, int) /usr/include/qt4/QtGui/qapplication.h:130: note: QApplication::QApplication(Display, Qt::HANDLE, Qt::HANDLE, int) /usr/include/qt4/QtGui/qapplication.h:128: note: QApplication::QApplication(int&, char, QApplication::Type, int) /usr/include/qt4/QtGui/qapplication.h:127: note: QApplication::QApplication(int&, char, bool, int) /usr/include/qt4/QtGui/qapplication.h:126: note: QApplication::QApplication(int&, char, int) QMAWindow.h: In constructor ‘QMAApplication::QMAApplication(int&, char, bool)’: QMAWindow.h:57: error: class ‘QMAApplication’ does not have any field named ‘QApplication’ QMAWindow.h:57: error: no matching function for call to ‘QApplication::QApplication()’ /usr/include/qt4/QtGui/qapplication.h:375: note: candidates are: QApplication::QApplication(const QApplication&) /usr/include/qt4/QtGui/qapplication.h:131: note: QApplication::QApplication(Display, int&, char, Qt::HANDLE, Qt::HANDLE, int) /usr/include/qt4/QtGui/qapplication.h:130: note: QApplication::QApplication(Display, Qt::HANDLE, Qt::HANDLE, int) /usr/include/qt4/QtGui/qapplication.h:128: note: QApplication::QApplication(int&, char, QApplication::Type, int) /usr/include/qt4/QtGui/qapplication.h:127: note: QApplication::QApplication(int&, char, bool, int) /usr/include/qt4/QtGui/qapplication.h:126: note: QApplication::QApplication(int&, char, int) QMAWindow.h: In constructor ‘QMAApplication::QMAApplication(int&, char, QApplication::Type)’: QMAWindow.h:58: error: class ‘QMAApplication’ does not have any field named ‘QApplication’ QMAWindow.h:58: error: no matching function for call to ‘QApplication::QApplication()’ /usr/include/qt4/QtGui/qapplication.h:375: note: candidates are: QApplication::QApplication(const QApplication&) /usr/include/qt4/QtGui/qapplication.h:131: note: QApplication::QApplication(Display, int&, char, Qt::HANDLE, Qt::HANDLE, int) /usr/include/qt4/QtGui/qapplication.h:130: note: QApplication::QApplication(Display, Qt::HANDLE, Qt::HANDLE, int) /usr/include/qt4/QtGui/qapplication.h:128: note: QApplication::QApplication(int&, char, QApplication::Type, int) /usr/include/qt4/QtGui/qapplication.h:127: note: QApplication::QApplication(int&, char, bool, int) /usr/include/qt4/QtGui/qapplication.h:126: note: QApplication::QApplication(int&, char, int) QMAWindow.h: In member function ‘int QMAApplication::QApplication(Display, Qt::HANDLE, Qt::HANDLE)’: QMAWindow.h:60: error: only constructors take base initializers QMAWindow.h:60: error: class ‘QMAApplication’ does not have any field named ‘QApplication’ QMAWindow.h:60: warning: no return statement in function returning non-void QMAWindow.h: In member function ‘int QMAApplication::QApplication(Display, int&, char, Qt::HANDLE, Qt::HANDLE)’: QMAWindow.h:61: error: only constructors take base initializers QMAWindow.h:61: error: class ‘QMAApplication’ does not have any field named ‘QApplication’ In file included from main.cc:49: QMAWindow.h:61: warning: no return statement in function returning non-void make: _\ [main.o] Error 1

Thanks! Max

mameisam commented 13 years ago

Also, I am not sure what is the sequence of the install between QMA, QMA2 and libvpvl. I tried installing vpvl: it worked, but I had to edit CMakeLists.txt because somehow it couldn't find bullet libraries (although the environment variable is set as BULLET_LIBRARY_DIR="/usr/local/lib". So, I edited:

if(BULLET_INCLUDE_DIRS AND BULLET_LIBRARIES)

if(BULLET_INCLUDE_DIRS)

and then libvpvl compiled.

Then, I tried building QMA2 but get the following error: maxim@sal:~/h/MMDAIM/QMA2$ qmake maxim@sal:~/h/MMDAIM/QMA2$ make g++ -Wl,-O1 -o MMDAI2 main.o MainWindow.o SceneWidget.o TimelineWidget.o HandleWidget.o FaceWidget.o CameraPerspectiveWidget.o TransformWidget.o moc_MainWindow.o moc_SceneWidget.o moc_TimelineWidget.o moc_HandleWidget.o moc_FaceWidget.o moc_CameraPerspectiveWidget.o moc_TransformWidget.o qrcQMA2.o -L/usr/lib -L/usr/X11R6/lib -L../libvpvl/lib -lvpvl -L/usr/local/lib -lBulletCollision -lBulletDynamics -lBulletSoftBody -lLinearMath -lGLEW -lQtOpenGL -lQtGui -lQtCore -lGLU -lGL -lpthread SceneWidget.o: In function SceneWidget::paintGL()': SceneWidget.cc:(.text+0x271): undefined reference tovpvl::gl::Renderer::initializeSurface()' SceneWidget.cc:(.text+0x27c): undefined reference to vpvl::gl::Renderer::drawSurface()' SceneWidget.o: In functionSceneWidget::initializeGL()': SceneWidget.cc:(.text+0xfc3): undefined reference to vpvl::gl::Renderer::initializeGLEW(unsigned int&)' SceneWidget.cc:(.text+0x102d): undefined reference tovpvl::gl::Renderer::Renderer(vpvl::gl::IDelegate, int, int, int)' SceneWidget.o: In function SceneWidget::addAssetInternal(QString const&, QDir const&)': SceneWidget.cc:(.text+0x1424): undefined reference tovpvl::gl::Renderer::loadAsset(vpvl::XModel_, std::basic_string<char, std::chartraits, std::allocator > const&)' SceneWidget.o: In function SceneWidget::deleteSelectedModel()': SceneWidget.cc:(.text+0x2459): undefined reference tovpvl::gl::Renderer::unloadModel(vpvl::PMDModel const)' SceneWidget.o: In function SceneWidget::~SceneWidget()': SceneWidget.cc:(.text+0x306b): undefined reference tovpvl::gl::Renderer::unloadModel(vpvl::PMDModel const)' SceneWidget.o: In function SceneWidget::~SceneWidget()': SceneWidget.cc:(.text+0x3cdb): undefined reference tovpvl::gl::Renderer::unloadModel(vpvl::PMDModel const)' SceneWidget.o: In function SceneWidget::~SceneWidget()': SceneWidget.cc:(.text+0x43db): undefined reference tovpvl::gl::Renderer::unloadModel(vpvl::PMDModel const)' SceneWidget.o: In function SceneWidget::addModelInternal(QString const&, QDir const&)': SceneWidget.cc:(.text+0x4bf3): undefined reference tovpvl::gl::Renderer::loadModel(vpvl::PMDModel, std::basic_string<char, std::chartraits, std::allocator > const&)' SceneWidget.o: In function SceneWidget::resizeGL(int, int)': SceneWidget.cc:(.text+0x231): undefined reference tovpvl::gl::Renderer::resize(int, int)' collect2: ld returned 1 exit status make: ** [MMDAI2] Error 1

Thanks, Max

hkrn commented 13 years ago

This issue is known for me and may be fixed by the latest commit (a8355fb84c213cfbb163). QMA2 (QMA2 is different from QMA) and libvpvl are under development and undocumented how to build. (The commented issue solve by adding "-DVPVL_OPENGL_RENDERER=ON" to CMake's option)

mameisam commented 13 years ago

I see. Are QMA, QMA2 and libvpvl necessary to run MMDAI? How do I produce the executable (QtMMDAI, I guess)? Thanks

mameisam commented 13 years ago

OK, trying to build QMA after merging with latest git repo:

maxim@sal:~/h/MMDAIM/QMA$ qmake maxim@sal:~/h/MMDAIM/QMA$ make g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4 -I/usr/include -I/usr/local/include -I/usr/include/bullet -I/usr/local/include/bullet -I/usr/X11R6/include -I. -o main.o main.cc g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4 -I/usr/include -I/usr/local/include -I/usr/include/bullet -I/usr/local/include/bullet -I/usr/X11R6/include -I. -o QMATimer.o QMATimer.cc g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4 -I/usr/include -I/usr/local/include -I/usr/include/bullet -I/usr/local/include/bullet -I/usr/X11R6/include -I. -o QMAWindow.o QMAWindow.cc g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4 -I/usr/include -I/usr/local/include -I/usr/include/bullet -I/usr/local/include/bullet -I/usr/X11R6/include -I. -o QMAModelLoader.o QMAModelLoader.cc g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4 -I/usr/include -I/usr/local/include -I/usr/include/bullet -I/usr/local/include/bullet -I/usr/X11R6/include -I. -o QMAModelLoaderFactory.o QMAModelLoaderFactory.cc g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4 -I/usr/include -I/usr/local/include -I/usr/include/bullet -I/usr/local/include/bullet -I/usr/X11R6/include -I. -o QMALipSyncLoader.o QMALipSyncLoader.cc g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4 -I/usr/include -I/usr/local/include -I/usr/include/bullet -I/usr/local/include/bullet -I/usr/X11R6/include -I. -o QMALogger.o QMALogger.cc g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4 -I/usr/include -I/usr/local/include -I/usr/include/bullet -I/usr/local/include/bullet -I/usr/X11R6/include -I. -o QMALogViewWidget.o QMALogViewWidget.cc g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4 -I/usr/include -I/usr/local/include -I/usr/include/bullet -I/usr/local/include/bullet -I/usr/X11R6/include -I. -o QMAPreference.o QMAPreference.cc g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4 -I/usr/include -I/usr/local/include -I/usr/include/bullet -I/usr/local/include/bullet -I/usr/X11R6/include -I. -o QMADebugRenderEngine.o QMADebugRenderEngine.cc g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4 -I/usr/include -I/usr/local/include -I/usr/include/bullet -I/usr/local/include/bullet -I/usr/X11R6/include -I. -o QMATextRenderEngine.o QMATextRenderEngine.cc QMATextRenderEngine.cc: In member function ‘void QMATextRenderEngine::setText(const QStringList&)’: QMATextRenderEngine.cc:101: error: ‘class QImage’ has no member named ‘constBits’ make: *\ [QMATextRenderEngine.o] Error 1

Thanks, Max