IDE는 Eclipse 3.5를 사용한다.
필요한 Software
1. MinGW: http://www.mingw.org/에서 Download하지 말고 http://www.tdragon.net/recentgcc/에서 최신 Version을 Download하여 설치한다.
2. Pthread: 아마 OpenMP를 PThread를 이용하여 구현한 것 같다. http://www.mingw.org/에서 Pthread 최신 Version을 Download 받는다. 압축을 풀어 Pre−built.2 폴더로 이동한다.
Pre−built.2/include/의 모든 파일은
Pre−built.2/lib/*.dll 파일은
Pre−built.2/lib/*.dll이외의 파일은
3. gcc: Ver 4.2이후 것을 Download 받아 bin 폴더 밑의 *.dll을
4. C:\MinGW\lib\gcc\mingw32\4.4.1\libgomp.spec 파일의 내용을 다음과 같이 변경한다.
# This spec file is read by gcc when linking. It is used to specify the
# standard libraries we need in order to link with -fopenmp.
#*link_gomp: -lgomp %{static: -lpthread }
*link_gomp: -lgomp -lpthreadGC2
이 네가지 작업을 끝나면 기본적인 개발 환경은 구성되었다.
마지막으로 Eclipse를 실행하여 Proect Protperty -> C/C++ Build -> Settings로 이동하여
GCC C Compiler -> Miscellaneous와 MinGW C Linker -> Miscellaneous에 -fopenmp option을 추가하며 모든 설정이 완료된다.
댓글 없음:
댓글 쓰기