Question

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

Was it helpful?

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 ..."

OTHER TIPS

I have found solution for FFTW library in Borland. Beside compilation of lib files by 'implib' i added

#pragma comment(lib, "fftw3-3.lib")
#pragma comment(lib, "fftw3f-3.lib" )
#pragma comment(lib, "fftw3l-3.lib" )

Also copied .dll files to executable folder and it compiles now. Yet, I am not sure if it's working properly.

Kiss FFT is still mistery for me.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top