You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This appeared to be successful and no errors were produced.
When I try to compile a C++ program, the linker produces this error where I call a filter constructor: Undefined symbol: kfr::iir_filter::iir_filter(kfr::iir_params<double, 18446744073709551615ul> const&)
Here is the pertinent source code:
#include "kfr/base.hpp"
#include "kfr/dsp/biquad.hpp"
#include "kfr/dsp/biquad_design.hpp"
#include "kfr/dsp/special.hpp"
#include "kfr/io.hpp"
using namespace kfr;
int main() {
std::cout << "Hello world KFR" << std::endl;
univector<fbase, 128> output;
biquad_section bq[] = {
biquad_notch(0.1, 0.5),
biquad_notch(0.2, 0.5),
biquad_notch(0.3, 0.5),
biquad_notch(0.4, 0.5),
};
output = iir(unitimpulse(), iir_params{ bq });
iir_filter EQ_R(bq);
return EXIT_SUCCESS;
}
The code compiles cleanly and runs if I remove the function call.
Is the problem that Xcode doesn't know where kfr was built to? If so, how do I configure that?
Any help would be greatly appreciated.
Best,
Geoff.
The text was updated successfully, but these errors were encountered:
Hi,
Have you added the kfr_dsp static library to the linker input in Xcode? Xcode (like any other compiler) requires explicit linking to the libraries you use.
I hadn't Dan, thanks.
I'm new to Xcode and overlooked setting up for the linker.
Kudos for the great work you're doing.
In the hope that someone may benefit, here is how I have configured Xcode.
NB: Directory names are my own.
Click on Project Navigator pane and click on project.
Click “Build Settings” button on the ribbon along the top of the screen.
Scroll down to “Search Paths” and open it.
Open the “Library Search Paths:” item.
Add /Users/geoff/Documents/kfr-main/lib/debug to the Debug item.
Add /Users/geoff/Documents/kfr-main/lib to the Release item.
Click "Build Phases" button on the ribbon.
Click on “Link Binary with Libraries”.
Click the “+” symbol.
Click “Add Other” then “Add Files”.
Navigate to “kfr-main” folder and select it.
Select the “lib” folder to reveal the kfr .a library files .
Choose the library files needed for the project. I needed:
libkfr_dsp_sse41.a
libkfr_dsp_avx512.a
libkfr_dsp_avx2.a
libkfr_dsp_avx.a
libkfr_io.a
Click Open.
The dialog will close and the libraries will have been added to the list.
The compiler will now be able to find the libraries.
Hi all,
I'm developing on MacOS 14.4 and Xcode 15. Target is MacOS 14.
I installed the latest stable version of kfr 6 using these commands (I previously installed current versions of cmake and ninja):
cmake -B build-release -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/Users/geoffw/Documents/kfr-main -DCMAKE_CXX_COMPILER=/usr/bin/clang
ninja -C build-release install
cmake -B build-debug -GNinja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/Users/geoffw/Documents/kfr-main -DCMAKE_CXX_COMPILER=/usr/bin/clang
ninja -C build-debug install
This appeared to be successful and no errors were produced.
When I try to compile a C++ program, the linker produces this error where I call a filter constructor:
Undefined symbol: kfr::iir_filter::iir_filter(kfr::iir_params<double, 18446744073709551615ul> const&)
Here is the pertinent source code:
#include "kfr/base.hpp"
#include "kfr/dsp/biquad.hpp"
#include "kfr/dsp/biquad_design.hpp"
#include "kfr/dsp/special.hpp"
#include "kfr/io.hpp"
using namespace kfr;
int main() {
std::cout << "Hello world KFR" << std::endl;
univector<fbase, 128> output;
biquad_section bq[] = {
biquad_notch(0.1, 0.5),
biquad_notch(0.2, 0.5),
biquad_notch(0.3, 0.5),
biquad_notch(0.4, 0.5),
};
output = iir(unitimpulse(), iir_params{ bq });
iir_filter EQ_R(bq);
return EXIT_SUCCESS;
}
The code compiles cleanly and runs if I remove the function call.
Is the problem that Xcode doesn't know where kfr was built to? If so, how do I configure that?
Any help would be greatly appreciated.
Best,
Geoff.
The text was updated successfully, but these errors were encountered: