Я пытаюсь собрать qtpropertybrowser
, которая является частью qt-solutions
. Я включаю это как часть SUBDIRS
в subdirs
проект. Я побежал qmake
на buildlib/buildlib.pro
, через Qt Creator, а затем Makefile
и был встречен с этой ошибкой, исходящей от moc
файл:
/the_path/buildlib/moc_qtpropertybrowser.cpp:360: error: member access into incomplete type 'QtAbstractPropertyBrowserPrivate'
case 4: _t->d_func()->slotPropertyInserted((*reinterpret_cast< QtProperty*(*)>(_a[1])),(*reinterpret_cast< QtProperty*(*)>(_a[2])),(*reinterpret_cast< QtProperty*(*)>(_a[3]))); break;
^
Полный журнал выглядит следующим образом:
20:25:29: Running steps for project BALLS...
20:25:29: Starting: "/usr/lib/x86_64-linux-gnu/qt5/bin/qmake" /home/jesse/Code/BALLS/BALLS/qtpropertybrowser.pro -r -spec linux-clang CONFIG+=debug DEFINES+=QTILITIES_PROPERTY_BROWSER
Reading /home/jesse/Code/BALLS/BALLS/qt-solutions/qtpropertybrowser/buildlib/buildlib.pro [/home/jesse/Code/BALLS/build/debug/qt-solutions/qtpropertybrowser/buildlib]
20:25:29: The process "/usr/lib/x86_64-linux-gnu/qt5/bin/qmake" exited normally.
20:25:29: Starting: "/usr/bin/make"cd qt-solutions/qtpropertybrowser/buildlib/ && ( test -e Makefile || /usr/lib/x86_64-linux-gnu/qt5/bin/qmake /home/jesse/Code/BALLS/BALLS/qt-solutions/qtpropertybrowser/buildlib/buildlib.pro -spec linux-clang CONFIG+=debug DEFINES+=QTILITIES_PROPERTY_BROWSER -o Makefile ) && /usr/bin/make -f Makefile
make[1]: Entering directory '/home/jesse/Code/BALLS/build/debug/qt-solutions/qtpropertybrowser/buildlib'
clang++ -c -pipe -g -D_REENTRANT -Wall -W -fPIC -DQTILITIES_PROPERTY_BROWSER -DQT_DISABLE_DEPRECATED_BEFORE=0 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/home/jesse/Code/BALLS/BALLS/qt-solutions/qtpropertybrowser/buildlib -I. -I/home/jesse/Code/BALLS/BALLS/qt-solutions/qtpropertybrowser/src -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-clang -o qtpropertybrowser.o /home/jesse/Code/BALLS/BALLS/qt-solutions/qtpropertybrowser/src/qtpropertybrowser.cpp
clang++ -c -pipe -g -D_REENTRANT -Wall -W -fPIC -DQTILITIES_PROPERTY_BROWSER -DQT_DISABLE_DEPRECATED_BEFORE=0 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/home/jesse/Code/BALLS/BALLS/qt-solutions/qtpropertybrowser/buildlib -I. -I/home/jesse/Code/BALLS/BALLS/qt-solutions/qtpropertybrowser/src -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-clang -o qtpropertymanager.o /home/jesse/Code/BALLS/BALLS/qt-solutions/qtpropertybrowser/src/qtpropertymanager.cpp
clang++ -c -pipe -g -D_REENTRANT -Wall -W -fPIC -DQTILITIES_PROPERTY_BROWSER -DQT_DISABLE_DEPRECATED_BEFORE=0 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/home/jesse/Code/BALLS/BALLS/qt-solutions/qtpropertybrowser/buildlib -I. -I/home/jesse/Code/BALLS/BALLS/qt-solutions/qtpropertybrowser/src -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-clang -o qteditorfactory.o /home/jesse/Code/BALLS/BALLS/qt-solutions/qtpropertybrowser/src/qteditorfactory.cpp
clang++ -c -pipe -g -D_REENTRANT -Wall -W -fPIC -DQTILITIES_PROPERTY_BROWSER -DQT_DISABLE_DEPRECATED_BEFORE=0 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/home/jesse/Code/BALLS/BALLS/qt-solutions/qtpropertybrowser/buildlib -I. -I/home/jesse/Code/BALLS/BALLS/qt-solutions/qtpropertybrowser/src -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-clang -o qtvariantproperty.o /home/jesse/Code/BALLS/BALLS/qt-solutions/qtpropertybrowser/src/qtvariantproperty.cpp
/home/jesse/Code/BALLS/BALLS/qt-solutions/qtpropertybrowser/src/qtvariantproperty.cpp:149:24: warning: private field 'q_ptr' is not used [-Wunused-private-field]
QtVariantProperty *q_ptr;
^
1 warning generated.
clang++ -c -pipe -g -D_REENTRANT -Wall -W -fPIC -DQTILITIES_PROPERTY_BROWSER -DQT_DISABLE_DEPRECATED_BEFORE=0 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/home/jesse/Code/BALLS/BALLS/qt-solutions/qtpropertybrowser/buildlib -I. -I/home/jesse/Code/BALLS/BALLS/qt-solutions/qtpropertybrowser/src -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-clang -o qttreepropertybrowser.o /home/jesse/Code/BALLS/BALLS/qt-solutions/qtpropertybrowser/src/qttreepropertybrowser.cpp
clang++ -c -pipe -g -D_REENTRANT -Wall -W -fPIC -DQTILITIES_PROPERTY_BROWSER -DQT_DISABLE_DEPRECATED_BEFORE=0 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/home/jesse/Code/BALLS/BALLS/qt-solutions/qtpropertybrowser/buildlib -I. -I/home/jesse/Code/BALLS/BALLS/qt-solutions/qtpropertybrowser/src -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-clang -o qtbuttonpropertybrowser.o /home/jesse/Code/BALLS/BALLS/qt-solutions/qtpropertybrowser/src/qtbuttonpropertybrowser.cpp
clang++ -c -pipe -g -D_REENTRANT -Wall -W -fPIC -DQTILITIES_PROPERTY_BROWSER -DQT_DISABLE_DEPRECATED_BEFORE=0 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/home/jesse/Code/BALLS/BALLS/qt-solutions/qtpropertybrowser/buildlib -I. -I/home/jesse/Code/BALLS/BALLS/qt-solutions/qtpropertybrowser/src -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-clang -o qtgroupboxpropertybrowser.o /home/jesse/Code/BALLS/BALLS/qt-solutions/qtpropertybrowser/src/qtgroupboxpropertybrowser.cpp
clang++ -c -pipe -g -D_REENTRANT -Wall -W -fPIC -DQTILITIES_PROPERTY_BROWSER -DQT_DISABLE_DEPRECATED_BEFORE=0 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/home/jesse/Code/BALLS/BALLS/qt-solutions/qtpropertybrowser/buildlib -I. -I/home/jesse/Code/BALLS/BALLS/qt-solutions/qtpropertybrowser/src -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-clang -o qtpropertybrowserutils.o /home/jesse/Code/BALLS/BALLS/qt-solutions/qtpropertybrowser/src/qtpropertybrowserutils.cpp
/usr/lib/x86_64-linux-gnu/qt5/bin/rcc -name qtpropertybrowser /home/jesse/Code/BALLS/BALLS/qt-solutions/qtpropertybrowser/src/qtpropertybrowser.qrc -o qrc_qtpropertybrowser.cpp
clang++ -c -pipe -g -D_REENTRANT -Wall -W -fPIC -DQTILITIES_PROPERTY_BROWSER -DQT_DISABLE_DEPRECATED_BEFORE=0 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/home/jesse/Code/BALLS/BALLS/qt-solutions/qtpropertybrowser/buildlib -I. -I/home/jesse/Code/BALLS/BALLS/qt-solutions/qtpropertybrowser/src -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-clang -o qrc_qtpropertybrowser.o qrc_qtpropertybrowser.cpp
/usr/lib/x86_64-linux-gnu/qt5/bin/moc -DQTILITIES_PROPERTY_BROWSER -DQT_DISABLE_DEPRECATED_BEFORE=0 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-clang -I/home/jesse/Code/BALLS/BALLS/qt-solutions/qtpropertybrowser/buildlib -I/home/jesse/Code/BALLS/BALLS/qt-solutions/qtpropertybrowser/src -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/include/c++/4.9 -I/usr/include/x86_64-linux-gnu/c++/4.9 -I/usr/include/c++/4.9/backward -I/usr/lib/gcc/x86_64-linux-gnu/4.9/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/4.9/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include /home/jesse/Code/BALLS/BALLS/qt-solutions/qtpropertybrowser/src/qtpropertybrowser.h -o moc_qtpropertybrowser.cpp
clang++ -c -pipe -g -D_REENTRANT -Wall -W -fPIC -DQTILITIES_PROPERTY_BROWSER -DQT_DISABLE_DEPRECATED_BEFORE=0 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/home/jesse/Code/BALLS/BALLS/qt-solutions/qtpropertybrowser/buildlib -I. -I/home/jesse/Code/BALLS/BALLS/qt-solutions/qtpropertybrowser/src -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-clang -o moc_qtpropertybrowser.o moc_qtpropertybrowser.cpp
moc_qtpropertybrowser.cpp:360:29: error: member access into incomplete type 'QtAbstractPropertyBrowserPrivate'
case 4: _t->d_func()->slotPropertyInserted((*reinterpret_cast< QtProperty*(*)>(_a[1])),(*reinterpret_cast< QtProperty*(*)>(_a[2])),(*reinterpret_cast< QtProperty*(*)>(_a[3]))); break;
^
./../../../../../BALLS/qt-solutions/qtpropertybrowser/src/qtpropertybrowser.h:263:18: note: forward declaration of 'QtAbstractPropertyBrowserPrivate'
friend class QtAbstractPropertyBrowserPrivate;
^
moc_qtpropertybrowser.cpp:361:29: error: member access into incomplete type 'QtAbstractPropertyBrowserPrivate'
case 5: _t->d_func()->slotPropertyRemoved((*reinterpret_cast< QtProperty*(*)>(_a[1])),(*reinterpret_cast< QtProperty*(*)>(_a[2]))); break;
^
./../../../../../BALLS/qt-solutions/qtpropertybrowser/src/qtpropertybrowser.h:263:18: note: forward declaration of 'QtAbstractPropertyBrowserPrivate'
friend class QtAbstractPropertyBrowserPrivate;
^
moc_qtpropertybrowser.cpp:362:29: error: member access into incomplete type 'QtAbstractPropertyBrowserPrivate'
case 6: _t->d_func()->slotPropertyDestroyed((*reinterpret_cast< QtProperty*(*)>(_a[1]))); break;
^
./../../../../../BALLS/qt-solutions/qtpropertybrowser/src/qtpropertybrowser.h:263:18: note: forward declaration of 'QtAbstractPropertyBrowserPrivate'
friend class QtAbstractPropertyBrowserPrivate;
^
moc_qtpropertybrowser.cpp:363:29: error: member access into incomplete type 'QtAbstractPropertyBrowserPrivate'
case 7: _t->d_func()->slotPropertyDataChanged((*reinterpret_cast< QtProperty*(*)>(_a[1]))); break;
^
./../../../../../BALLS/qt-solutions/qtpropertybrowser/src/qtpropertybrowser.h:263:18: note: forward declaration of 'QtAbstractPropertyBrowserPrivate'
friend class QtAbstractPropertyBrowserPrivate;
^
4 errors generated.
Makefile:692: recipe for target 'moc_qtpropertybrowser.o' failed
make[1]: Leaving directory '/home/jesse/Code/BALLS/build/debug/qt-solutions/qtpropertybrowser/buildlib'
Makefile:42: recipe for target 'sub-qt-solutions-qtpropertybrowser-buildlib-make_first' failed
make[1]: *** [moc_qtpropertybrowser.o] Error 1
make: *** [sub-qt-solutions-qtpropertybrowser-buildlib-make_first] Error 2
20:25:48: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project BALLS (kit: Desktop)
When executing step 'Make'
20:25:48: Elapsed time: 00:19.
qmake
вызов это:
qmake /home/jesse/Code/BALLS/BALLS/BALLS.pro -r -spec linux-clang CONFIG+=debug DEFINES+=QTILITIES_PROPERTY_BROWSER
И это в коде, который я даже не написал! Как я могу решить эту проблему, чтобы я мог скомпилировать qtpropertybrowser
и использовать это?
Это не то, как вы должны это построить.
Создайте папку сборки и введите ее:
mkdir ~/qtpropertybrowser-build
cd ~/qtpropertybrowser-build
Находясь в папке сборки, запустите configure
для решения. Например, если ваш git checkout находится в ~/qt-solutions
:
~/qt-solutions/qtpropertybrowser/configure
Наконец, соберите его:
qmake && make -j