Small issue compiling KFR 7 using Xcode
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
Best, Geoff.
Hi Dan,
Just following up on this issue.
Cheers
Geoff.
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)
Thanks Dan, That resolve it. Cheers, Geoff.