User forums > General (but related to Code::Blocks)

TDM's unofficial GCC 4.2.0 for MinGW (now with OpenMP, Fortran and Obj-C)

<< < (21/22) > >>

stahta01:

--- Quote from: marouanebj on September 17, 2007, 09:24:56 pm ---Hi,
I don't know if it's the proper place.
But I have a probleme compiling a program with OpenMP.
1/ I installed the last release of MinGW with the installer 5.1.3

--- End quote ---

I suggest doing a manual install so you know exactly what binaries were installed.

Tim S

TDragon:
marouanebj:
You need to add "-fopenmp" to the linking step as well. I'm not sure how this is done in Eclipse.

marouanebj:
Hi again, Still same troubles

ok I added the -fopenmp in the linking. Here is the result:
**** Internal Builder is used for build               ****
gcc -O3 -g -Wall -c -fmessage-length=0 -fopenmp -osrc\main.o ..\src\main.c
gcc -Xlinker -fopenmp -shared -olibtestgcc.exe src\main.o
src\main.o: In function `main':C:/Documents and Settings/marouane/eclipse_workspace/test gcc/Release/../src/main.c:9: undefined reference to `GOMP_parallel_start'
:C:/Documents and Settings/marouane/eclipse_workspace/test gcc/Release/../src/main.c:9: undefined reference to `GOMP_parallel_end'
collect2: ld returned 1 exit status
Build error occurred, build is stopped
Time consumed: 328  ms.

Is it possible that I have a Path Problem ? or the information on where is the lib which contain this header (omp.h)  file.
- I'm almost a beginner in compiling, so if I say strange things correct me.

marouanebj:
should I add the -fopenmp in the GCC Assembler flags ?
information: the configuration on Eclipse are divided in 3: Assembler, Compiler, Linker.

marouanebj:
OK I got it.

There was an error in the second compilation:
this work:
**** Internal Builder is used for build               ****
gcc -O2 -g -Wall -c -fmessage-length=0 -fopenmp -osrc\main.o ..\src\main.c
gcc -fopenmp -otestgcc.exe src\main.o
Build complete for project test gcc
Time consumed: 281  ms. 

Thanks All

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version