Zetian Ren
Zetian Ren

Reputation: 21

omp.h can't be found when compile C++ with MinGW on windows

I am writing C++ code and compile using g++, MinGM, on windows, but error shows that:

error: omp.h: No such file or directory #include ^ compilation terminated.

This is the installation list when i installed MinGW: enter image description here

omp.h file cannot be found in installation file of MinGW: enter image description here

Upvotes: 0

Views: 3458

Answers (1)

John_West
John_West

Reputation: 2399

Basically, the public sources recommend installing TDM-GCC, because it has default OpenMP installation choice:

http://tdm-gcc.tdragon.net/download

Also, with standard MinGW, try from your MinGW console:

mingw-get install mingw32-pthreads-w32
mingw-get install mingw32-pthreads-w32-dev

Upvotes: 1

Related Questions