Search code examples
visual-studio-codeopenmp

OpenMP | VS CODE | Linux


How to enable OpenMP in Visual Studio Code?

I know we need to add a flag '-fopenmp', but I don't know where?

If possible share a keyboard shortcut to access the file.

Thanks!


Solution

  • @Tryer solution of using Makefile is definitely useful and preferable.


    Alternatively, one can pass it with g++ as:

    g++ test.cc -o test -fopenmp