c++signal-processingborland-c++kissfft

Kiss fft linker error in Borland C++


I have a problem with compiling my program. I am using Kiss FFT library in my project but when i'm trying to build it I get those errors:

[Linker Error] Error: Unresolved external '_kiss_fft_alloc' referenced from C:\[path]\UNIT4.OBJ

[Linker Error] Error: Unresolved external '_kiss_fft' referenced from C:\[path]\UNIT4.OBJ

I assume it's something about '_' before name of function but I have no idea how to solve it so far.

Code:

Unit4.cpp - gist.github.com/anonymous/fa33e0982240b00ff8c8

Unit4.h - gist.github.com/anonymous/b35e9abf93c93aeb1d45

[EDIT]

I switched to FFWT library but I have the same issue. I have compiled libraries and added them to Borland project in compilator path and linker path.

[Linker Error] Error: Unresolved external '_fftw_malloc' referenced from C:\[path]\UNIT4.OBJ
[Linker Error] Error: Unresolved external '_fftw_plan_dft_1d' referenced from C:\[path]\UNIT4.OBJ
[Linker Error] Error: Unresolved external '_fftw_execute' referenced from C:\[path]\UNIT4.OBJ
[Linker Error] Error: Unresolved external '_fftw_destroy_plan' referenced from C:\[path]\UNIT4.OBJ
[Linker Error] Error: Unresolved external '_fftw_free' referenced from C:\[path]\UNIT4.OBJ

For example when i use


Solution

  • Your issue is basic C/C++ usage.

    You must include the compiled code in your project for it to be used in your project.

    KISSFFT comes with the source. That source must be compiled and linked to your program.

    FFTW is installed in the form of a library. Someone else compiled it into libraries. You are linking it into your executable with "#pragma comment(lib ..."