Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Aug 2009 11:08:16 +0200
From:      Andrea Venturoli <ml@netfence.it>
To:        Daniel Underwood <djuatdelta@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: OpenMP
Message-ID:  <4A9B9300.80603@netfence.it>
In-Reply-To: <b6c05a470907300721r5f842b9fub2ad6a056bacb81a@mail.gmail.com>
References:  <4A71455C.2070506@netfence.it> <b6c05a470907300721r5f842b9fub2ad6a056bacb81a@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Daniel Underwood ha scritto:
> Did you add the "-fopenmp" flag to both the compiler and the linker?
> Both need it.

Thanks, this solves any compiling/linking problem.

Now my compiling session looks like this:

g++42 -c -pipe -Wall -Wextra -Wpointer-arith -Wwrite-strings 
-Wconversion -Wsign-compare  -g -march=athlon64 -ffloat-store -fopenmp 
-Wall -Wno-unused -o libobj.o libobj.cpp
ar rs lib.a libobj.o
ar: creating lib.a
g++42 -c -pipe -Wall -Wextra -Wpointer-arith -Wwrite-strings 
-Wconversion -Wsign-compare  -g -march=athlon64 -ffloat-store -fopenmp 
-Wall -Wno-unused -o test.o test.cpp
g++42 -o test.exe test.o lib.a -L/usr/local/lib -lstdc++ -lm -lGL -lc 
-fopenmp

No errors or warning are printed while compiling/linking.
However, the program crashes with a Bad system call as soon as it calls 
std::getline.

  bye & Thanks
	av.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A9B9300.80603>