slugg
Diamond Member
Hey guys. So I'm working with some older code I wrote some time ago. I was originally going to port it to Windows, had some success, but quickly ran into other problems and decided to move back to a *nix environment. The original code compiled and ran just fine in the first try.
I'm running Ubuntu 11.10 and have chosen Eclipse as my IDE. When compiling and running the original code, everything is fine. Now I've installed the FFTW library (www.fftw.org) and can't seem to build anything.
I installed the library using aptitude in the terminal:
The library definitely exists:
And I've added "fftw3" to my project's properties->C++ Linker->Libraries list in Eclipse.
The header file <fftw3.h> is found just fine.
When I go to compile, every single data type that is defined in the library fails to be defined, so essentially the compiler has no idea what to do.
I'm a bit stumped...
Here's one of the errors (they're all identical):
Line:
Error:
Here's some copy/pasta from the console in Eclipse:
Halp 🙁
I'm running Ubuntu 11.10 and have chosen Eclipse as my IDE. When compiling and running the original code, everything is fine. Now I've installed the FFTW library (www.fftw.org) and can't seem to build anything.
I installed the library using aptitude in the terminal:
Code:
sudo apt-get install libfftw3-dev libfftw3-doc
The library definitely exists:
Code:
~$ g++ -lfftw3
/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: ld returned 1 exit status
And I've added "fftw3" to my project's properties->C++ Linker->Libraries list in Eclipse.
The header file <fftw3.h> is found just fine.
When I go to compile, every single data type that is defined in the library fails to be defined, so essentially the compiler has no idea what to do.
I'm a bit stumped...
Here's one of the errors (they're all identical):
Line:
Code:
fftw_real a[M][N];
Code:
error: ‘fftw_real’ was not declared in this scope
Here's some copy/pasta from the console in Eclipse:
Code:
**** Build of configuration Debug for project GerryIP ****
make -j all
Building file: ../Source/ipTool.cpp
Invoking: GCC C++ Compiler
g++ -lfftw3 -I/home/gerry/Documents/_Digital_Image_Processing/gerryip_eclipse/Headers -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"Source/ipTool.d" -MT"Source/ipTool.d" -o"Source/ipTool.o" "../Source/ipTool.cpp"
../Source/ipTool.cpp: In static member function ‘static void ipTool::transformDFT(Image&, Image&, ROI, FilterParams)’:
../Source/ipTool.cpp:42:2: error: ‘fftw_real’ was not declared in this scope
../Source/ipTool.cpp:42:12: error: expected ‘;’ before ‘a’
../Source/ipTool.cpp:43:12: error: expected ‘;’ before ‘b’
../Source/ipTool.cpp:44:14: error: ‘result’ was not declared in this scope
../Source/ipTool.cpp:46:2: error: ‘rfftwnd_plan’ was not declared in this scope
../Source/ipTool.cpp:46:15: error: expected ‘;’ before ‘pinv’
../Source/ipTool.cpp:47:15: error: expected ‘;’ before ‘p’
../Source/ipTool.cpp:66:4: error: ‘a’ was not declared in this scope
../Source/ipTool.cpp:72:3: error: ‘pinv’ was not declared in this scope
../Source/ipTool.cpp:72:36: error: ‘FFTW_COMPLEX_TO_REAL’ was not declared in this scope
../Source/ipTool.cpp:72:71: error: ‘rfftw2d_create_plan’ was not declared in this scope
../Source/ipTool.cpp:73:38: error: ‘a’ was not declared in this scope
../Source/ipTool.cpp:73:48: error: ‘b’ was not declared in this scope
../Source/ipTool.cpp:73:55: error: ‘rfftwnd_one_complex_to_real’ was not declared in this scope
../Source/ipTool.cpp:78:3: error: ‘p’ was not declared in this scope
../Source/ipTool.cpp:78:32: error: ‘FFTW_REAL_TO_COMPLEX’ was not declared in this scope
../Source/ipTool.cpp:78:70: error: ‘FFTW_IN_PLACE’ was not declared in this scope
../Source/ipTool.cpp:78:83: error: ‘rfftw2d_create_plan’ was not declared in this scope
../Source/ipTool.cpp:79:3: error: ‘a’ was not declared in this scope
../Source/ipTool.cpp:79:78: error: ‘rfftwnd_one_real_to_complex’ was not declared in this scope
../Source/ipTool.cpp:88:43: error: ‘a’ was not declared in this scope
../Source/ipTool.cpp:103:24: error: ‘pinv’ was not declared in this scope
../Source/ipTool.cpp:103:28: error: ‘rfftwnd_destroy_plan’ was not declared in this scope
../Source/ipTool.cpp:105:24: error: ‘p’ was not declared in this scope
../Source/ipTool.cpp:105:25: error: ‘rfftwnd_destroy_plan’ was not declared in this scope
make: *** [Source/ipTool.o] Error 1
Halp 🙁
Last edited: