"_vDSP_create_fftsetupD", referenced from:
_csoundRealFFT2Setup in libCsoundLib64.a(fftlib.c.o)
"_vDSP_destroy_fftsetupD", referenced from:
_setupDispose in libCsoundLib64.a(fftlib.c.o)
"_vDSP_fft_zripD", referenced from:
_csoundRealFFT2 in libCsoundLib64.a(fftlib.c.o)
_vDSP_DCT_execute in libCsoundLib64.a(fftlib.c.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 am guessing that I am missing a library I have to link to.
I think his problem might be that -lCsoundLib64 is linking to the static library libCsound.a. For that you
need to pass all the other libraries (which you should not when linking to the dynamic library in the framework).
The missing framework is Accelerate I think. However I would advise to always link to the framework instead,
which is a dynamic link and that sorts all the dependencies. This is the right way to do it, plus you don’t need to
guess what libraries you need. Also you don’t need to install any extra libraries like libsndfile
So with a standard installation of Csound, all you need is
c++ -o test main.cpp -I/Library/Frameworks/CsoundLib64.framework/Headers -F/Library/Frameworks -framework CsoundLib64
That is, you are linking to the framework. Furthermore if you add the framework name to the header #include,
you can even remove -I path,
c++ -o test maincs.cpp -F/Library/Frameworks -framework CsoundLib64
which is very handy I think.
Prof. Victor Lazzarini