Closed IvanDSM closed 3 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.
Hi, Are you using clang? It's required for DFT.
Thanks, that solved it! Really sorry I didn't notice that warning in the README.
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:
And here's the output when building:
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.