Ubuntu 18.04 Can't use gcc - fopenmp option

I am using ubuntu 18.04 and the command gcc openmp1.c -o openmp1 –fopenmp returns this error:

gcc: error: –fopenmp: no such file or directory

My gcc version:

gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
2

1 Answer

This is a copy-paste error : –fopenmp has a unicode dash in place of a regular ASCII dash. use this instead :

gcc -fopenmp

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like