I am attempting to get fftw running from the fftw-2.1.5-1spec.DevPak designed for c++.
(I'm using Dev-C++ 4.9.9.2 running on WinXP) The basic program reads as:
include <iostream>
include <math.h>
include <stdio.h>
include <fstream>
include <fftw.h>
fftw_plan fftw_create_plan(int n, fftw_direction dir, int flags);
using namespace std;
int main()
{
int i, N = 16;
double fx[N];
double dx = 2*3.1415/N;
fftw_complex in[N], out[N];
fftw_plan p;
p = fftw_create_plan(N, FFTW_FORWARD, FFTW_ESTIMATE);
The compiler log reads:
Compiler: Default compiler
Executing g++.exe...
g++.exe "C:\Documents and Settings\Brian\Desktop\CPPWorks\hw4e.cpp" -o "C:\Documents and Settings\Brian\Desktop\CPPWorks\hw4e.exe" -ansi -fexceptions -I"C:\Dev-Cpp\lib\gcc\mingw32\3.4.2\include" -I"C:\Dev-Cpp\include\c++\3.4.2\backward" -I"C:\Dev-Cpp\include\c++\3.4.2\mingw32" -I"C:\Dev-Cpp\include\c++\3.4.2" -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib" -lobjc
C:\Dev-Cpp\Bin..\lib\gcc\mingw32\3.4.2........\mingw32\bin\ld.exe: cannot find -lobjc
collect2: ld returned 1 exit status
Execution terminated
If I'm going about the implementation wrong, it would be good to know. The program should take the fourier transformation of the fx array and return it in out (near as I can tell).
Most of the context was taken straight from the fftw2 documentation at fftw.org. I changed the compiler options to "link an objective C program" which dismissed most of the orignial [linker error]'s but replaced it with "cannot find -logjc. Any assistance would be appreciated, thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Oh... I missed that bit at the end! Don't change anything unless you know what it is for. You got no linker errors because the linker failed to even run!
You would do well to post the original log before you screwed it up.
Clifford
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You have told the compiler to link an Objective-C program.
Apart from the fact that you probably did not intend to do that (which begs the question why you did!?), if you do you need to download additional support files for it. You need to disable the option in teh project settings.
Objective-C is a different language used primarily on NeXT and OSX.
Regarding the path "C:\Documents and Settings\Brian\Desktop\CPPWorks\" you should read the "PLEASE READ BEFORE POSTING A QUESTION" thread, especially with respect to its advice on not using paths containing spaces.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Don't be under the illusion that adding the -lobjc option fixed anything. It
just replaced put an error in front of your other errors that stopped things
before it got to yours.
Wayne
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am attempting to get fftw running from the fftw-2.1.5-1spec.DevPak designed for c++.
(I'm using Dev-C++ 4.9.9.2 running on WinXP) The basic program reads as:
include <iostream>
include <math.h>
include <stdio.h>
include <fstream>
include <fftw.h>
fftw_plan fftw_create_plan(int n, fftw_direction dir, int flags);
using namespace std;
int main()
{
int i, N = 16;
double fx[N];
double dx = 2*3.1415/N;
fftw_complex in[N], out[N];
fftw_plan p;
p = fftw_create_plan(N, FFTW_FORWARD, FFTW_ESTIMATE);
}
The compiler log reads:
Compiler: Default compiler
Executing g++.exe...
g++.exe "C:\Documents and Settings\Brian\Desktop\CPPWorks\hw4e.cpp" -o "C:\Documents and Settings\Brian\Desktop\CPPWorks\hw4e.exe" -ansi -fexceptions -I"C:\Dev-Cpp\lib\gcc\mingw32\3.4.2\include" -I"C:\Dev-Cpp\include\c++\3.4.2\backward" -I"C:\Dev-Cpp\include\c++\3.4.2\mingw32" -I"C:\Dev-Cpp\include\c++\3.4.2" -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib" -lobjc
C:\Dev-Cpp\Bin..\lib\gcc\mingw32\3.4.2........\mingw32\bin\ld.exe: cannot find -lobjc
collect2: ld returned 1 exit status
Execution terminated
If I'm going about the implementation wrong, it would be good to know. The program should take the fourier transformation of the fx array and return it in out (near as I can tell).
Most of the context was taken straight from the fftw2 documentation at fftw.org. I changed the compiler options to "link an objective C program" which dismissed most of the orignial [linker error]'s but replaced it with "cannot find -logjc. Any assistance would be appreciated, thanks.
Oh... I missed that bit at the end! Don't change anything unless you know what it is for. You got no linker errors because the linker failed to even run!
You would do well to post the original log before you screwed it up.
Clifford
You have told the compiler to link an Objective-C program.
Apart from the fact that you probably did not intend to do that (which begs the question why you did!?), if you do you need to download additional support files for it. You need to disable the option in teh project settings.
Objective-C is a different language used primarily on NeXT and OSX.
Regarding the path "C:\Documents and Settings\Brian\Desktop\CPPWorks\" you should read the "PLEASE READ BEFORE POSTING A QUESTION" thread, especially with respect to its advice on not using paths containing spaces.
Don't be under the illusion that adding the -lobjc option fixed anything. It
just replaced put an error in front of your other errors that stopped things
before it got to yours.
Wayne