Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: Ronschk on February 02, 2011, 03:59:02 pm

Title: Compiler directives
Post by: Ronschk on February 02, 2011, 03:59:02 pm
Hi, I don't know if that's the correct word, so here is my problem:

I want to use Openmp, but the compiler says, there is an undefined refernce to 'omp_ste_num_threads'. I know that the programm is correct and I guess I know what to problem is: I have to add -fopenmp somewhere. But I don't know where.

thank you


p.s. There's probably already a thread about this topic, but I didn't know what to search for. sorry
Title: Re: Compiler directives
Post by: oBFusCATed on February 02, 2011, 04:08:43 pm
If it is compiler option: Project -> Build options -> Compiler -> Other
If it is linker option: Project -> Build options -> Linker -> Other

You need a project for this to work.
Title: Re: Compiler directives
Post by: Ronschk on February 02, 2011, 05:30:04 pm
okay thank you.
still had some problems, but I found a nice tut. If someone else wants to do parallel programming and doesn't know how to include omp, just watch this short tutorial.
http://www.youtube.com/watch?v=p0woqF2XCeg&feature=player_embedded#