kfrlib / kfr

Fast, modern C++ DSP framework, FFT, Sample Rate Conversion, FIR/IIR/Biquad Filters (SSE, AVX, AVX-512, ARM NEON)
https://www.kfrlib.com
GNU General Public License v2.0
1.65k stars 253 forks source link

kfr_dft isn't built #96

Closed IvanDSM closed 3 years ago

IvanDSM commented 4 years ago

I am trying to build a CMake project with the KFR libraries, but trying to link kfr_dft as the README describes fails. Here's the relevant snippet of my CMake file:

target_link_libraries(Nuclide kfr)

target_link_libraries(Nuclide kfr_dft)

target_link_libraries(Nuclide kfr_io)

And here's the output when building:

[  6%] Automatic MOC and UIC for target kfr_io
[  6%] Built target kfr_io_autogen
Scanning dependencies of target kfr_io
[ 12%] Building CXX object kfr/CMakeFiles/kfr_io.dir/kfr_io_autogen/mocs_compilation.cpp.o
[ 18%] Building CXX object kfr/CMakeFiles/kfr_io.dir/include/kfr/io/impl/audiofile-impl.cpp.o
[ 25%] Linking CXX static library libkfr_io.a
[ 25%] Built target kfr_io
[ 31%] Automatic MOC and UIC for target Nuclide
[ 31%] Built target Nuclide_autogen
Scanning dependencies of target Nuclide
[ 37%] Building CXX object CMakeFiles/Nuclide.dir/Nuclide_autogen/mocs_compilation.cpp.o
[ 43%] Building CXX object CMakeFiles/Nuclide.dir/main.cpp.o
[ 50%] Building CXX object CMakeFiles/Nuclide.dir/mainwindow.cpp.o
[ 56%] Building CXX object CMakeFiles/Nuclide.dir/naudiofile.cpp.o
[ 62%] Building CXX object CMakeFiles/Nuclide.dir/naudioview.cpp.o
[ 68%] Building CXX object CMakeFiles/Nuclide.dir/naudioworkspace.cpp.o
[ 75%] Linking CXX executable Nuclide
/usr/bin/ld: cannot find -lkfr_dft
collect2: error: ld returned 1 exit status
gmake[2]: *** [CMakeFiles/Nuclide.dir/build.make:182: Nuclide] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:122: CMakeFiles/Nuclide.dir/all] Error 2
gmake: *** [Makefile:149: all] Error 2
22:17:10: The process "/usr/bin/cmake" exited with code 2.
Error while building/deploying project Nuclide (kit: Desktop)
When executing step "CMake Build"

My code doesn't call the DFT library yet, I'm trying to get this linking stage sorted out before trying to do anything with it.

samuelriddle commented 3 years ago

Hi, Are you using clang? It's required for DFT.

IvanDSM commented 3 years ago

Thanks, that solved it! Really sorry I didn't notice that warning in the README.