Re: [Dev-C++] Re: newbie: trying to install FFTW library on XP
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Per W. <pw...@ia...> - 2004-07-30 22:23:51
|
Are you compiling the code as C++?
In that case you should rewrite the lines like:
in = (fftw_complex*)fftw_malloc(sizeof...
out = (fftw_complex*)fftw_malloc(sizof...
to typecast from void* to the data type of the in and out variables.
In older standards, there was an automagic cast from void* to everything
but newer standards likes you to manually specify that you know what data
types you have and what data types you want.
/Per W
On Fri, 30 Jul 2004 jd...@st... wrote:
> Siva:
>
> Thanks for your help, and I did as you suggested, and tried compiling the
> tutorial code...but I'm getting an error I don't quite understand:
>
> invalid conversion from `void*' to `double (*)[2]'
>
> this appears at the two lines with fftw_malloc(lines starred in my code below)
> here's the exact code I'm trying to compile...and I already put the header in
> the include folder and linked the .lib file. If you or anyone else had any
> ideas why this would happen, I'd appreciate it thanks.
>
> #include <stdlib.h>
> #include <fftw3.h>
>
> int main()
> {
> int N = 256;
> fftw_complex *in, *out;
> fftw_plan p;
> * in = fftw_malloc(sizeof(fftw_complex) * N);
> * out = fftw_malloc(sizeof(fftw_complex) * N);
> p = fftw_plan_dft_1d(N, in, out, FFTW_FORWARD, FFTW_ESTIMATE);
> fftw_execute(p); /* repeat as needed */
> fftw_destroy_plan(p);
> fftw_free(in); fftw_free(out);
> system("PAUSE");
> return 0;
> }
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by OSTG. Have you noticed the changes on
> Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
> one more big change to announce. We are now OSTG- Open Source Technology
> Group. Come see the changes on the new OSTG site. www.ostg.com
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|