0

I want to compile my program which uses OpenMp on mac os Sierra. I have Xcode8. I do it via terminal: g++ -fopenmp -o train train.cpp. The next errors occur:

clang: error: unsupported option '-fopenmp' clang: error: unsupported option '-fopenmp'

Tell me please how can I solve this problem.


clang --version

Apple LLVM version 8.1.0 (clang-802.0.42)

Target: x86_64-apple-darwin16.6.0

Thread model: posix

InstalledDir: /Library/Developer/CommandLineTools/usr/bin


g++ --version

Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1

Apple LLVM version 8.1.0 (clang-802.0.42)

Target: x86_64-apple-darwin16.6.0

Thread model: posix

InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Alex Rozhnov
  • 199
  • 3
  • 12
  • This could prove helpful to you: https://apple.stackexchange.com/questions/99077/how-to-set-gcc-4-8-as-default-gcc-compiler – gavsta707 Jun 15 '17 at 20:17
  • And so should this: https://stackoverflow.com/questions/43555410/enable-openmp-support-in-clang-in-mac-os-x-sierra, so you may need to try http://openmp.llvm.org/ – AS Mackay Jun 15 '17 at 21:43

0 Answers0