[英]Compiling a CGAL example program on Arch Linux with icpc
I want to compile an example program with CGAL 4.4 on Arch Linux with Intel Compiler. 我想在带有Intel Compiler的Arch Linux上使用CGAL 4.4编译示例程序 。
But, on compiling this code, I got the following error: 但是,在编译此代码时,出现以下错误:
$ icpc -o first_qp first_qp.cpp -lCGAL -I/usr/include/CGAL
The error message is here (pastebin) 错误消息在这里(pastebin)
What can I do? 我能做什么?
# My box is up-to-date and the CGAL and boost library were already installed by pacman. #我的包装盒是最新的,pacman已经安装了CGAL和boost库。
$ sudo pacman -Syu
$ sudo pacman -S cgal boost boost-libs
# I have already read an article about a similar question , but could not solve. #我已经阅读了有关类似问题的文章 ,但无法解决。
You should remove -I/usr/include/CGAL
. 您应该删除
-I/usr/include/CGAL
。 It is not needed, and it confuses the compiler, which reads /usr/include/CGAL/gmp.h
instead of /usr/include/gmp.h
. 不需要它,这会使编译器感到困惑,后者会读取
/usr/include/CGAL/gmp.h
而不是/usr/include/gmp.h
。 Note that the recommended way to compile CGAL examples is with cmake (see the documentation), which handles all the flags for you. 请注意,推荐的编译CGAL示例的方法是使用cmake(请参阅文档),它可以为您处理所有标志。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.