jasonlarkin / p3dfft

Automatically exported from code.google.com/p/p3dfft
GNU General Public License v3.0
0 stars 0 forks source link

Linker Problem when using Fortran Code in C code #62

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. extract p3dfft.2.5.1.tar.gz
2. ./configure --enable-gnu --enable-fftw 
--with-fftw="/opt64/packages/fftw-3.1/"
3. make

What is the expected output? What do you see instead?
I expect no errors during compilation of the samples. 

I get error messages, which look similar to 
"../Desktop/p3dfft.2.5.1/sample/C/../../include/p3dfft.h:96: undefined 
reference to `__p3dfft__p3dfft_get_dims'"

What version of the product are you using? On what operating system?
Ubuntu 10.04 64bit, GCC 4.4, FFTW 3.1, openmpi

I've found a solution to this error. When i change the necessary GCC_VERSION in 
gnu.h to #if GCC_VERSION < 40400 and #elif GCC_VERSION >= 40400, the linker 
looks for the correct names, which are in the libp3dfft.a

Im not an expert in using Fortran code in C codes, but i hope this helps to fix 
the problem.

Original issue reported on code.google.com by digidoe...@googlemail.com on 9 Aug 2012 at 1:07

GoogleCodeExporter commented 9 years ago
Fixed in later versions

Original comment by dmitry...@gmail.com on 16 Mar 2015 at 11:59

GoogleCodeExporter commented 9 years ago

Original comment by dmitry...@gmail.com on 17 Mar 2015 at 12:03