2

I'm trying to use omp in my C code and am having a problem: in the code i have #include but when i try to compile with:

g++ -fopenmp -g -c parallel.c

I get cc1plus: error: unrecognized command line option "fopenmp" and when i try:

g++ -g -c parallel.c

I get an error for both:

omp.h: No such file or directory, and malloc not declared in this scope

i tried with gcc with -fopenmp and get the same error. without the -fopenmp i still get the missing omp.

1 Answer 1

4

OpenMP is only supported in gcc 4.2 and higher. You might need to upgrade your compiler.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.