Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/134.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++ Qt5和OSX小牛问题_C++_Qt_Opengl_Cmake_Osx Mavericks - Fatal编程技术网

C++ Qt5和OSX小牛问题

C++ Qt5和OSX小牛问题,c++,qt,opengl,cmake,osx-mavericks,C++,Qt,Opengl,Cmake,Osx Mavericks,我正在使用Cmake在OS X 10.9上构建一个QT项目 自从Mavericks以来,OpenGL标题的位置似乎已经改变了。现在缺少文件夹/System/Library/Frameworks/OpenGL.framework/Headers,cmake说 CMake Error at /Applications/Qt/5.1.1/clang_64/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:8 (message): Failed to find "g

我正在使用Cmake在OS X 10.9上构建一个QT项目

自从Mavericks以来,OpenGL标题的位置似乎已经改变了。现在缺少文件夹
/System/Library/Frameworks/OpenGL.framework/Headers
,cmake说

CMake Error at /Applications/Qt/5.1.1/clang_64/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:8 (message):
  Failed to find "gl.h" in
  "/System/Library/Frameworks/OpenGL.framework/Headers"
  "/System/Library/Frameworks/AGL.framework/Headers""."
并要求我在变量
\u qt5gui\u OPENGL\u INCLUDE\u DIR
中提供正确的路径,我在Mavericks中尝试了他们显然将标题移动到的路径:

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/OpenGL.framework/Headers
但我仍然得到以下cmake错误:

CMake Error at /Applications/Qt/5.1.1/clang_64/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake:15 (message):
  The imported target "Qt5::Gui" references the file

     "/System/Library/Frameworks/OpenGL.framework/Headers"

  but this file does not exist.  Possible reasons include:

  * The file was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and contained

     "/Applications/Qt/5.1.1/clang_64/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake"

  but not all the files it references.

Call Stack (most recent call first):
  /Applications/Qt/5.1.1/clang_64/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:57 (_qt5_Gui_check_file_exists)
  /Applications/Qt/5.1.1/clang_64/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:64 (_qt5gui_find_extra_libs)
  /Applications/Qt/5.1.1/clang_64/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake:123 (include)
  CMakeLists.txt:40 (find_package)

现在我不知道如何处理这个错误,有什么想法吗?

您需要Qt 5.2和CMake 2.8.12:


Qt 5.1.1是在mavericks之前发布的,因此问题是可以预料的。谢谢,它与以下安装程序之一合作: