用icpc在Arch Linux上编译一个CGAL示例程序

Compiling a CGAL example program on Arch Linux with icpc

本文关键字:一个 CGAL 程序 例程 icpc Arch Linux 编译      更新时间:2023-10-16

我想在Arch Linux上用Intel Compiler编译一个示例程序。

但是,在编译这段代码时,我得到了以下错误:

$ icpc -o first_qp first_qp.cpp -lCGAL -I/usr/include/CGAL

错误信息在这里(pastebin)

我能做什么?

#我的盒子是最新的,并且CGAL和boost库已经被pacman安装了。

$ sudo pacman -Syu
$ sudo pacman -S cgal boost boost-libs 

#我已经读过一篇关于类似问题的文章,但是无法解决。

您应该删除-I/usr/include/CGAL。这是不需要的,它混淆了编译器,它读取/usr/include/CGAL/gmp.h而不是/usr/include/gmp.h。请注意,编译CGAL示例的推荐方法是使用cmake(请参阅文档),它可以为您处理所有标志。