Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ Qt 5 Qt3D QCorcularBuffer在哪里?_C++_Macos_Qt_Qt5_C++17 - Fatal编程技术网

C++ Qt 5 Qt3D QCorcularBuffer在哪里?

C++ Qt 5 Qt3D QCorcularBuffer在哪里?,c++,macos,qt,qt5,c++17,C++,Macos,Qt,Qt5,C++17,我想尝试QCircularBuffer,根据,因此我在macOS上的QtCreator上创建了一个简单的Qt(5.15.1)项目。如下所示: #include <QApplication> #include <QWidget> #include <Qt3D> int main(int argc, char *argv[]) { QApplication a(argc, argv); QWidget w; w.show();

我想尝试
QCircularBuffer
,根据,因此我在macOS上的QtCreator上创建了一个简单的Qt(5.15.1)项目。如下所示:

#include <QApplication>
#include <QWidget>

#include <Qt3D>

int main(int argc, char *argv[]) {
    QApplication a(argc, argv);
    QWidget w;
    w.show();
    return a.exec();
}
但我不能建造这个,我得到了:

18:48:09: Running steps for project project...
18:48:09: Configuration unchanged, skipping qmake step.
18:48:09: Starting: "/usr/bin/make" -j8
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -g -std=gnu++1z  -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.13 -Wall -Wextra -fPIC -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_3DCORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../../Qt5.15.1/5.15.1/clang_64/lib/QtWidgets.framework/Headers -I../../Qt5.15.1/5.15.1/clang_64/lib/Qt3DCore.framework/Headers -I../../Qt5.15.1/5.15.1/clang_64/lib/QtGui.framework/Headers -I../../Qt5.15.1/5.15.1/clang_64/lib/QtNetwork.framework/Headers -I../../Qt5.15.1/5.15.1/clang_64/lib/QtCore.framework/Headers -Idebug -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/AGL.framework/Headers -I../../Qt5.15.1/5.15.1/clang_64/mkspecs/macx-clang -F/Users/user/Qt5.15.1/5.15.1/clang_64/lib -o debug/main.o main.cpp
main.cpp:6:10: fatal error: 'Qt3D' file not found
#include <Qt3D>
         ^~~~~~
1 error generated.
make: *** [debug/main.o] Error 1
18:48:10: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project project (kit: Desktop Qt 5.15.1 clang 64bit)
The kit Desktop Qt 5.15.1 clang 64bit has configuration issues which might be the root cause for this problem.
When executing step "Make"
18:48:09:正在运行项目的步骤。。。
18:48:09:配置未更改,正在跳过qmake步骤。
18:48:09:开始:“/usr/bin/make”-j8
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++-c-pipe-stdlib=libc++-g-std=gnu++1z-arch x86_64-isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk-mmacox-version-min=10.13-Wall-Wextra-fPIC-DQT\u-QML调试-DQT\u-LIB-DQT_3DCORE_LIB-DQT_GUI_LIB-DQT_NETWORK_LIB-DQT_CORE_LIB-I..//Qt5.15.1/clang_64/LIB/qtwidts.framework/Headers-I..//Qt5.15.1/clang_64/LIB/Qt3DCore.framework/Headers-I..//Qt5.15.15.1/Qt5.15.1/clang_64/qtu 64/LIB/QtGui.framework/qtu/qtu.15.1/qtu/qtu-I.././Qt5.15.1/5.15.1/clang_64/lib/QtCore.framework/Headers-Idebug-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/OpenGL.framework/Headers-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.Platforms/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/AGL.framework/Headers-I..//Qt5.15.1/5.15.1/clang_64/mkspecs/macx-clang-F/Users/user/Qt5.15.1/clang_64/lib-o debug/main.o main.cpp
main.cpp:6:10:致命错误:未找到“Qt3D”文件
#包括
^~~~~~
生成1个错误。
make:**[debug/main.o]错误1
18:48:10:进程“/usr/bin/make”已退出,代码为2。
生成/部署项目时出错(工具包:Desktop Qt 5.15.1 64位)
kit Desktop Qt 5.15.1 clang 64位存在配置问题,这可能是此问题的根本原因。
执行步骤“Make”时
看起来我做错了什么,对吗?

请添加QT+=3dcore 到项目的.pro文件

如果错误仍然存在,则未安装模块“Qt3D.Core”。
请安装它并重新编译您的项目。

您安装了3d模块吗?我想是的,因为项目使用
QT+=core gui widgets 3dcore
构建得很好,如果我评论
#include
。我想这不是证据。我还能够编译一个QT+=3dcore的项目,尽管我还没有用QT安装这个模块。在我看来,这个类已经从Qt3D中删除了。你看过吗?它看起来好像具有相同的功能。顺便说一句,我从未见过有人像你这样导入Qt3D。我总是只直接导入我需要的类。为了使用
QCircularBuffer
,我应该导入什么?假设我使用的Qt版本已经存在
QCircularBuffer
Qt+=3dcore
,如问题中所述。没有与包含
3dcore
相关的错误。据我所知,它抱怨
Qt3D
,恐怕它在
qt5.15.1
18:48:09: Running steps for project project...
18:48:09: Configuration unchanged, skipping qmake step.
18:48:09: Starting: "/usr/bin/make" -j8
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -g -std=gnu++1z  -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.13 -Wall -Wextra -fPIC -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_3DCORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../../Qt5.15.1/5.15.1/clang_64/lib/QtWidgets.framework/Headers -I../../Qt5.15.1/5.15.1/clang_64/lib/Qt3DCore.framework/Headers -I../../Qt5.15.1/5.15.1/clang_64/lib/QtGui.framework/Headers -I../../Qt5.15.1/5.15.1/clang_64/lib/QtNetwork.framework/Headers -I../../Qt5.15.1/5.15.1/clang_64/lib/QtCore.framework/Headers -Idebug -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/AGL.framework/Headers -I../../Qt5.15.1/5.15.1/clang_64/mkspecs/macx-clang -F/Users/user/Qt5.15.1/5.15.1/clang_64/lib -o debug/main.o main.cpp
main.cpp:6:10: fatal error: 'Qt3D' file not found
#include <Qt3D>
         ^~~~~~
1 error generated.
make: *** [debug/main.o] Error 1
18:48:10: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project project (kit: Desktop Qt 5.15.1 clang 64bit)
The kit Desktop Qt 5.15.1 clang 64bit has configuration issues which might be the root cause for this problem.
When executing step "Make"