c++ - 在 Mac OS X 10.7.2 上用 C++ 编译基本的 CGAL 程序

标签 c++ macos cgal

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

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 。 (不要忘记此命令中空格后的点)
    • 配置:上方窗口显示为红色
    • 在 camke-gui 上部窗口取消标记 CGAL-QT3 和 CGAL-QT4
    • 重新配置
    • 制作
    • 安装
    • 完成!

运行演示:

  • 安装 QT4 然后在 CGAL src 代码中打开 Cmake-gui (of CGAL src code)
    • 在cmake-gui上层窗口中标记CGAL_QT4
    • 重新配置
    • 制作
    • 安装
    • 完成!

点击此链接了解更多详情和疑问: http://cgal-discuss.949826.n4.nabble.com/Compiling-a-basic-CGAL-program-in-C-on-Mac-OS-X-10-7-2-td4166413.html

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

关于c++ - 在 Mac OS X 10.7.2 上用 C++ 编译基本的 CGAL 程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8404968/

相关文章:

c - macOS:找不到 -lpaho-mqtt3c 的库

c++ - 为什么我不能在CGAL中加分

c++ - CGAL - 表面网格参数化

java - 循环无向图中的所有可能路径

objective-c - 在 Objective-C 中获取另一个应用程序的图标

c++ - C或C++语言中的数组实际上是指针吗

python - 使 HelloWorld python 脚本可执行

rotation - CGAL:如何将一个 3D 矢量旋转到另一个矢量上?

c++ - 如何在 Dev C++ 上显示带有中文字母的行?

c++ - 为什么 SFINAE 技巧在尝试类成员指针时不适用于非类类型?