HI I am using i586-mingw32msvc-gcc to cross compile Windows program on Debian 7.1.0.
I test a very simple code: int main(int argc, char* argv[]) { #pragma omp parallel printf("Hello, world.\n"); return 1; } when I compile it with -fopenmp, I found an error: $ i586-mingw32msvc-gcc -fopenmp /home/kinian/omp.c -o /home/kinian/omp.exe i586-mingw32msvc-gcc: libgomp.spec: no such file or directory then I copy *libgomp.spec* from /usr/lib/gcc/i486-linux-gnu/4.4/ to /usr/lib/gcc/i586-mingw32msvc/4.4.4/ the error changed: /usr/lib/gcc/i586-mingw32msvc/4.4.4/../../../../i586-mingw32msvc/bin/ld: cannot find -lgomp collect2: ld returned 1 exit status so I also copy *libgomp.a* from /usr/lib/gcc/i486-linux-gnu/4.4/ to /usr/lib/gcc/i586-mingw32msvc/4.4.4/ then the error is: /tmp/ccS8r60e.o:omp.c:(.text+0x26): undefined reference to `_GOMP_parallel_start' /tmp/ccS8r60e.o:omp.c:(.text+0x37): undefined reference to `_GOMP_parallel_end' collect2: ld returned 1 exit status I have noticed the version between i486-linux-gnu 4.4 and i586-mingw32msvc 4.4.4 is not matched. And also the different between native compiler and cross compiler. But I want to know how to get the correct matched file for i586-mingw32msvc. Thanks for reply my question.