【问题标题】:Qt 5 and OS X Mavericks issuesQt 5 和 OS X Mavericks 问题
【发布时间】:2013-11-03 18:54:30
【问题描述】:

我正在使用 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""."

并要求我在此变量 _qt5gui_OPENGL_INCLUDE_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.1.1 在小牛队之前发布,因此会出现问题。

标签: c++ qt opengl cmake osx-mavericks


【解决方案1】:
猜你喜欢
  • 2013-12-06
  • 1970-01-01
  • 2013-10-21
  • 2013-12-02
  • 2014-03-04
  • 1970-01-01
  • 2013-06-11
  • 1970-01-01
相关资源
最近更新 更多