c++ - Unknown pragma when compiling OpenMP with g++ -
i working on c++ code contains openmp pragmas. while trying compile g++, receiving following error message:
ignoring #pragma omp parallel [-werror=unknown-pragmas]
i understand error not using fopenmp flag in makefile. have tried including fopenmp flag cxxflags. still, not working.
would think of solutions work around issue?
note: question looks repeat question of similar question on same error , have gone through , tried too. therefore, request question not flagged repeat question.
this warning appears if compile openmp code without -fopenmp flag. g++ man page tells -fopenmp does:
enable handling of openmp directives "#pragma omp" in c/c++ , "!$omp" in fortran. when -fopenmp specified, compiler generates parallel code according openmp application program interface v3.0 http://www.openmp.org/. option implies -pthread, , supported on targets have support -pthread
Comments
Post a Comment