OpenMP

Andrea Venturoli ml at netfence.it
Mon Aug 31 12:14:20 UTC 2009


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.


More information about the freebsd-questions mailing list