cilk.h: No such file or directory

871 views Asked by At

I compile in Ubuntu 20.04 with gcc 7.5.0 and g++ 7.5.0(supporting cilk plus), but the error says that 'cilk/cilk.h: No such file or directory'the error is shown in the picture

Anybody could help me with the situation? Thanks a lot!

1

There are 1 answers

0
Elephant88 On

Your compiler still doesn't support cilkplus, just install it via apt-get install:

sudo apt-get install -y libcilkrts5

there you go,

UPDATE: Cilk is not supported with the gcc package on ubuntu 20.04, to have cilk on ubuntu 20.04 you have to install gcc version < 7 , by the following instruction it's possible to install gcc-6 g++6 on ubuntu 20.04,

sudo vim /etc/apt/sources.list
add "deb http://dk.archive.ubuntu.com/ubuntu/ bionic main universe" to file
sudo apt update
sudo apt-get install gcc-6 g++-6 -y

check by gcc -v if you have downgraded correctly the gcc version Then the cilk extension should work.