不存在包括目录“/ opt / local / include”fftw

时间:2013-12-17 04:00:06

标签: gfortran fftw

我正在尝试编译测试程序来测试我的fftw实现。我已经构建并安装了fftw,如教程中所述,并使用./configure g77 = gfortran将我的编译器配置为gfortran。我在Ubuntu 13.10上。

这是我的makefile:

INCLUDES=-I. -I/opt/local/include

  fftwTest: fftwTest.f90
    gfortran $^ $(INCLUDES) -O3 -fbounds-check -l fftw3 -L /usr/local/lib -o $@

这是程序本身:

program fftwTest
    implicit none

    include 'fftw3.f'   

    double complex in, out
        dimension in(N), out(N)
        integer*8 plan

        call fftw_f77_create_plan(plan,N,FFTW_FORWARD,FFTW_ESTIMATE)
        call fftw_f77_one(plan,in,out)
        call fftw_f77_destroy_plan(plan)

   end program fftwTest

当我做fftwTest时,这是我得到的错误:

gfortran fftwTest.f90 -I。 -I / opt / local / include -O3 -fbounds-check -l fftw3 -L / usr / local / lib -o fftwTest 警告:不存在包含目录“/ opt / local / include” fftwTest.f90:4:错误:无法打开包含的文件'fftw3.f03' make: * [fftwTest]错误1

1 个答案:

答案 0 :(得分:0)

在makefile中更改:

INCLUDES=-I. -I/opt/local/include

为:

INCLUDES=-I. -I/usr/local/include
                ^^^