OSX Yosemite에서 openMP를 사용하는 방법을 배우려하지만, gcc는 openMP를 지원하지 않는 것 같아서 homebrew에서 gcc 4.9를 설치했습니다. 나는이 명령을 사용하여 다음과 같은 코드를 컴파일 할 때 문제가 발생합니다 : GCC-4.9 MAIN.CPP -fopenmp -o 프로그램을OpenMP 라이브러리를 사용하여 C 코드를 실행하는 중 오류가 발생했습니다.
#include <omp.h>
#include <stdio.h>
int main() {
#pragma omp parallel
printf("Hello from thread %d, nthreads %d\n", omp_get_thread_num(), omp_get_num_threads());
}
나는 다음과 같은 오류 얻을 : 무엇에
Undefined symbols for architecture x86_64:
"___gxx_personality_v0", referenced from:
Dwarf Exception Unwind Info (__eh_frame) in cccRGd8K.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
어떤 아이디어 그 뜻은?
OpenMP와는 아무런 관련이 없습니다. http://stackoverflow.com/questions/203548/undefined-symbol-gxx-personality-v0-on-link – damienfrancois