我正在尝试编译qtpropertybrowser
,这是qt-solutions
的一部分。我在SUBDIRS
项目中将其作为subdirs
的一部分包含在内。我通过Qt Creator在buildlib/buildlib.pro
上运行qmake
,然后在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
这是代码我甚至没有写! 如何解决此问题,以便我可以编译public class Client
{
public Guid ClientId { get; set; }
public string FirstName { get; set; }
public virtual ICollection<ClientCard> ClientCard { get; set; }
}
public class Card
{
public Guid CardId { get; set; }
public string Number { get; set; }
public virtual ICollection<ClientCard> ClientCard { get; set; }
}
public class ClientCard
{
public Guid ClientCardId { get; set; }
public Guid CardId { get; set; }
public Guid ClientId { get; set; }
public virtual Client Client { get; set; }
public virtual Card Card { get; set; }
}
并使用它?
答案 0 :(得分:1)
那不是你应该如何构建它。
创建构建文件夹并输入:
mkdir ~/qtpropertybrowser-build
cd ~/qtpropertybrowser-build
在构建文件夹中,运行解决方案的configure
。例如,假设您的git结帐位于~/qt-solutions
:
~/qt-solutions/qtpropertybrowser/configure
最后,建立它:
qmake && make -j