kfr icon indicating copy to clipboard operation
kfr copied to clipboard

Small issue compiling KFR 7 using Xcode

Open geoffw64 opened this issue 4 weeks ago • 1 comments

Hi Dan,

I've found a small problem compiling KFR 7 using Xcode.

Steps:

  • Set up new project in Xcode.
  • Download and unzip kfr-macos-x86_64.zip asset from the KFR 7 page.
  • Add contents of the include/kfr folder from that asset to my project.
  • Add necessary kfr library files from that asset to my linker configuration.
  • Copy my app source code to the new project.

Issue:

  • When building my app using Xcode, the compiler generates an error while processing kfr/base/npy.hpp: 'kfr/base/endianness.hpp' file not found.
  • No other compile errors arise.

Analysis:

  • The endianness.hpp file exists in folder kfr/base.
  • The npy.hpp file contains: #include <kfr/base/endianness.hpp> #include <kfr/simd/complex.hpp>

Candidate solution:

  • Compiles successfully if I change the above to: #include "endianness.hpp" #include "complex.hpp"

Apart from the above issue, modifying my app to use KFR 7 was just a matter of removing when using zpk and butterworth. I saw a mention of this in the release notes. Just 4 lines of code changed.

Best, Geoff.

geoffw64 avatar Dec 05 '25 03:12 geoffw64

Hi Dan, Just following up on this issue.
Cheers Geoff.

geoffw64 avatar Dec 09 '25 23:12 geoffw64

Hi Geoff, Manual linking without CMake requires a basic setup: Add the include directory containing the kfr subdirectory to your project’s include paths so the compiler can locate all KFR headers.

+ your_project_dir/
  + include/  ← add this to your project’s include directories
    + kfr/
      + base/
      ...
      all.hpp
  + lib/
    + ... kfr libraries here (.a, .lib)

dancasarin avatar Dec 11 '25 18:12 dancasarin

Thanks Dan, That resolve it. Cheers, Geoff.

geoffw64 avatar Dec 11 '25 23:12 geoffw64