简体   繁体   中英

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.

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)

What can I do?

# My box is up-to-date and the CGAL and boost library were already installed by pacman.

$ 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 . It is not needed, and it confuses the compiler, which reads /usr/include/CGAL/gmp.h instead of /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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM