提问人:zack 提问时间:3/7/2023 更新时间:3/7/2023 访问量:23
编译 qt 4.8.6 错误:typedef char IsIncompleteType[ sizeof(T) ? 1 : -1 ]
compile qt 4.8.6 error: typedef char IsIncompleteType[ sizeof(T) ? 1 : -1 ]
问:
我正在编译aarch64 qt 4.8.6,遇到了以下错误:
` 141 | struct QGlyphJustification
| ^~~~~~~~~~~~~~~~~~~
../../include/QtCore/../../src/corelib/tools/qscopedpointer.h: In instantiation of ‘static void QScopedPointerDeleter<T>::cleanup(T*) [with T = QPixmapFilter]’:
../../include/QtCore/../../src/corelib/tools/qscopedpointer.h:100:25: required from ‘QScopedPointer<T, Cleanup>::~QScopedPointer() [with T = QPixmapFilter; Cleanup = QScopedPointerDeleter<QPixmapFilter>]’
gl2paintengineex/qpaintengineex_opengl2_p.h:191:44: required from here
../../include/QtCore/../../src/corelib/tools/qscopedpointer.h:59:40: error: invalid application of ‘sizeo’ to incomplete type ‘QPixmapFilter’
59 | typedef char IsIncompleteType[ sizeof(T) ? 1 : -1 ];`
我在编译qt时遇到此错误。我该怎么办?
`struct QScopedPointerDeleter
{
static inline void cleanup(T *pointer)
{
// Enforce a complete type.
// If you get a compile error here, read the section on forward declared
// classes in the QScopedPointer documentation.
typedef char IsIncompleteType[ sizeof(T) ? 1 : -1 ];
(void) sizeof(IsIncompleteType);
delete pointer;
}
};`
我该怎么办?
我的编译命令:
`./configure -verbose -prefix /home/third_party/graphics/qt-4.8.6/out \
-qpa -arch aarch64 -xplatform qws/linux-aarch64-g++ \
-opensource -fast -qconfig custom -confirm-license \
-no-rpath -no-largefile -no-system-proxies -no-exceptions -no-accessibility -no-stl -qt-sql-sqlite -no-qt3support \
-no-xmlpatterns -no-multimedia -no-audio-backend -no-phonon -no-phonon-backend \
-no-webkit -no-scripttools -no-declarative -no-declarative-debug \
-no-mmx -no-3dnow -no-sse -no-sse2 -no-sse3 -no-ssse3 -no-sse4.1 -no-sse4.2 -no-avx -no-neon \
-qt-zlib -no-libtiff -qt-libpng -no-libmng -no-libjpeg -no-openssl -silent \
-nomake tools -nomake examples -make demos -nomake docs -nomake translations \
-optimized-qmake -no-nis -no-cups -no-iconv -no-pch -no-dbus \
-little-endian -host-little-endian -qt-freetype -depths all -opengl es2 -egl \
-reduce-relocations -no-glib -no-gtkstyle \
-no-gfx-multiscreen -qt-gfx-transformed -qt-gfx-vnc -qt-mouse-tslib \
-I/home/third_party/graphics/qt-4.8.6/dep_build/include \
-L/home/third_party/graphics/qt-4.8.6/dep_build/lib `
答: 暂无答案
评论