Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
393 views
in Technique[技术] by (71.8m points)

openmp - <omp.h> library isn't found in the GCC version (4.2.1) in Mavericks

I have a problem with GCC. I want to update it to a new version, from the 4.2.1, to program with parallel programming. However, in this version there is no library . How can I download an updated version?

The error that the terminal give me is:

omp_hello.c:11:10: fatal error: 'omp.h' file not found
#include <omp.h>
         ^
1 error generated.
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
  1. download gcc-4.9-bin.tar.gz download or newer from http://hpc.sourceforge.net/: http://prdownloads.sourceforge.net/hpc/gcc-4.9-bin.tar.gz

  2. cd to your downloads folder and un-gzip the archive gunzip gcc-4.9-bin.tar.gz (Google Chrome would do that automatically)

  3. in the same folder run sudo tar -xvf gcc-4.9-bin.tar -C / - this will place new executable to /usr/local/bin

  4. add the following to ~/.bash_profile: export PATH=/usr/local/bin:$PATH

  5. open new terminal and run which gcc. This should point to /usr/local/bin/gcc


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...