Undefined symbols for architecture x86_64:
"_clfftInitSetupData", referenced from:
_main in preamble_cl-a591de.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have searched through the source and see references to clffInitSetupData, but do not see the source for the function and am wondering what I am doing wrong.
The line is:
/* Setup clFFT. */
clfftSetupData fftSetup;
err = clfftInitSetupData(&fftSetup);
gcc -o preamble_cl preamble_cl.c -lm -IclFFT/package/include -framework OpenCL -LclFFT/package/lib64/ -lclFFT -lStatTimer
C02QH2D7G8WM:openclexamples userone$ gcc -Wall clfft1.c -framework OpenCL -lclfft -o foo
clfft1.c:23:14: warning: unused variable 'event' [-Wunused-variable]
cl_event event = NULL;
^
1 warning generated.
Undefined symbols for architecture x86_64:
"_clfftInitSetupData", referenced from:
_main in clfft1-0df61d.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)C02QH2D7G8WM:openclexamples userone$ g++ -Wall clfft1.cpp -framework OpenCL -lclFFT -o clfft1
clfft1.cpp:23:14: warning: unused variable 'event' [-Wunused-variable]
cl_event event = NULL;
^
1 warning generated.It is fine.