Norm hi,
I just tried to put together the software you posted here for me.
Code:
g++ -std=c++11 -c main.cpp
cc1plus: error: unrecognized command line option -std=c++11
with just g++ it almost compiled but
emplace_back had to be replaced with
push_back.
At that stage it naturally asked for the class
CFFT. Remember,
Forward and
Inverse also have their own dependencies, so those also must be provided if I want to run this code. I however have it all set up in both C++ and Gfortran program which work and give me pretty much identical results.
Still
main.cpp is a nice code sample for me by itself. I appreciate it. I haven't used such code before.
At this stage I have to confess I don't understand how could the code you posted demonstrate the interoperability and I am interested primarily in Fortran routine calling "C" functions or subroutines, not the other way around.
My next question is related to
fftw3.f03 file. It is a FORTRAN interface, actually two, however it does not contain
fft_ function definition and overall it does not seem to have anything to do with the task at hand.
My third question or rather statement of fact is that when I tried to compile
fortran.f03 it gave me an expected error:
Code:
undefined reference to `fft_'
I will appreciate if you read my post and help me to put it all together with clarifying explanations.
Thanks you, - Alex