News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

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

Started by TDragon, May 18, 2007, 11:36:45 PM

Previous topic - Next topic

asdz

I am using NetBeans 6.0 on Windows XP...
I have add with success the GCC 4.2 build for Windows....
But i can't still now to compile a simple OpenMP code...
I have added -fopenmp compile option but still nothing...

Any advice? :S

Grom

see OpenMP tutorial. You have to make your's program parallel manually with something like that #pragma omp parallel for.
gcc+winXP+suse.

asdz

I am already running the simple Hello World - OpenMP code in NetBeans where i have these problems...
The same code is compiled fine on my machine in visual Studio 2005.... That's why i want some help with NetBeans 6.0 - OpenMP...

asdz

Quote from: asdz on November 22, 2007, 09:14:22 AM
I am already running the simple Hello World - OpenMP code in NetBeans where i have these problems...
The same code is compiled fine on my machine in visual Studio 2005.... That's why i want some help with NetBeans 6.0 - OpenMP...
anyone?

JacK-DuRdEn_

hi i was having problems with netbeans too, but i finally worked it out.
i had to modify the file libgomp.spec in the lib directory so it looks like this:

# 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 -lpthread


then i modified the file Makefile-Debug.mk (you should also modify Makefile-Release.mk if using that target; this file are
located in your project's "nbproject" directory)
adding "-fopenmp" (without quotes) to the CCFLAGS, CXXFLAGS, CFLAGS and LDLIBSOPTIONS lines. Maybe not
all of them are necessary but it works and it doesn't hurts xD you could figure out which one's are useless anyway.

sorry for posting info about other ide >_<