I need to vectorize a loop with a call to the exp-function in math.h. However, compiling a file with this
#include <math.h>
#include <omp.h>
#pragma omp declare simd
extern double __cdecl exp(double);
seems not to be possible, as I get the following error
D:\Dropbox\OpenMP>gcc -O3 -fopenmp testSIMD.c
C:\Users\JEPPED~1\AppData\Local\Temp\ccfKxQRJ.o:testSIMD.c:(.text+0x198): undefi
ned reference to `_ZGVcN4v_exp'
C:\Users\JEPPED~1\AppData\Local\Temp\ccfKxQRJ.o:testSIMD.c:(.text+0x348): undefi
ned reference to `_ZGVdN4v_exp'
C:\Users\JEPPED~1\AppData\Local\Temp\ccfKxQRJ.o:testSIMD.c:(.text.startup+0x26f)
: undefined reference to `_ZGVbN2v_exp'
C:\Users\JEPPED~1\AppData\Local\Temp\ccfKxQRJ.o:testSIMD.c:(.text.startup+0x286)
: undefined reference to `_ZGVbN2v_exp'
C:\Users\JEPPED~1\AppData\Local\Temp\ccfKxQRJ.o:testSIMD.c:(.text.startup+0x3af)
: undefined reference to `_ZGVbN2v_exp'
C:\Users\JEPPED~1\AppData\Local\Temp\ccfKxQRJ.o:testSIMD.c:(.text.startup+0x3c6)
: undefined reference to `_ZGVbN2v_exp'
collect2.exe: error: ld returned 1 exit status
I am using TDM-GCC 4.9.2 on a Windows 7 machine.
What is the problem? Any solutions?