本文介绍了在Mac OS X 10.7.2上使用C ++编译基本CGAL程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我试图编译Voronoi_Diagram_2示例,我得到这个输出:

When I tried to compile Voronoi_Diagram_2 example I am getting this output:

singhg@~/Programming/examples/Voronoi_diagram_2 $ cmake -DCGAL_DIR=/opt/local/lib/cmake/
CMake Error at CMakeLists.txt:20 (include):
  include could not find load file:

    /opt/local//opt/local/lib/cmake/UseCGAL.cmake


CMake Error at CMakeLists.txt:22 (include):
  include could not find load file:

    CGAL_CreateSingleSourceCGALProgram


CMake Error at CMakeLists.txt:26 (create_single_source_cgal_program):
  Unknown CMake command "create_single_source_cgal_program".


-- Configuring incomplete, errors occurred!

请帮助!

推荐答案

使CGAL3.9在Mac OS X 10.7.2上运行仅运行CGAL示例(演示不会运行此过程)




  • 从网站下载src代码

    • 在您的主目录中解压缩

    • 打开终端并转到文件夹CGAL3 .9

    • 运行cmake-gui。 (不要忘记此命令中空格后面的点)

    • 配置:上部窗口将显示红色

    • 取消标记CGAL-QT3 CGAL-QT4

    • 再次配置

    • make


    • 完成!

    • Make CGAL3.9 work on Mac OS X 10.7.2 to run only CGAL examples(Demos will not run with this procedure)

      • Download src code from the website
        • Extract it in your home directory
        • Open Terminal and go to the folder CGAL3.9
        • run cmake-gui . (don’t forget the dot after a space in this command)
        • Configure : upper window will look red
        • un-mark CGAL-QT3 and CGAL-QT4 in the camke-gui upper window
        • Configure again
        • make
        • make install
        • Done!

          • 安装QT4,然后在CGAL src代码(CGAL src代码)中打开Cmake-gui

            • 在cmake-gui上方窗口中标记CGAL_QT4

            • 再次配置

            • make

            • make install

            • 完成!

            • Install QT4 then open Cmake-gui in CGAL src code (of CGAL src code)
              • Mark CGAL_QT4 in the cmake-gui upper window
              • Configure again
              • make
              • make install
              • Done!

              >按照此链接了解详情和疑问:

              编译命令
              到Cmake CGAL代码:
              cmake -DCGAL_DIR = / opt / local / lib / cmake

              Compilation CommandTo Cmake CGAL Code:cmake -DCGAL_DIR=/opt/local/lib/cmake

              这篇关于在Mac OS X 10.7.2上使用C ++编译基本CGAL程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-13 15:13