Hi,
I'm relatively new with C++, I want to build a small program for batch image manipulation.
For the program to be faster I must enable OpenMP, I've tried to add "-fopenmp" to "Settings -> Compiler and debugger... -> Other options" and execute the "trivial test program" from http://openmp.org/wp/openmp-compilers/ :
#include <omp.h>
#include <stdio.h>
int main() {
#pragma omp parallel
printf("Hello from thread %d, nthreads %d\n", omp_get_thread_num(), omp_get_num_threads());
}
but I'm still receiving:
-------------- Build: Debug in consoleTest ---------------
Linking console executable: bin\Debug\consoleTest.exe
obj\Debug\main.o: In function `main':
D:/path/to/consoleTest/main.cpp:16: undefined reference to `GOMP_parallel_start'
D:/path/to/consoleTest/main.cpp:16: undefined reference to `GOMP_parallel_end'
obj\Debug\main.o: In function `main.omp_fn.0':
D:/path/to/consoleTest/main.cpp:17: undefined reference to `omp_get_num_threads'
D:/path/to/consoleTest/main.cpp:17: undefined reference to `omp_get_thread_num'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
4 errors, 0 warnings