[Scons-users] Set PATH to include directory for gfortran compiler
William Deegan
bill at baddogconsulting.com
Fri Apr 18 12:44:20 EDT 2014
Matteo,
On April 18, 2014 at 8:08:48 AM, Matteo Parsani (parsani.matteo at gmail.com) wrote:
> Dear Users and Developers,
> I am using scons to compile and build a project.
>
> I am using gfortran and my codes depends on other libraries installed
> separately and loaded through a module command in my .bashrc file.
>
> When I compile my code with scons, gfortran cannot find a library,
> specifically cgnslib_f.h which is located in a directory that is not
> "scanned" by gfortran.
>
>
> This is the error:
>
> gfortran -o fileio.o -c -Wuninitialized -Wsurprising -fbacktrace
> -fbounds-check -I/ump/fldmd/home/pmatteo/research/deps/include
> -I/ump/fldmd/home/pmatteo/research/lib_install/include fileio.f90
> fileio.f90:5: Error: Can't open included file 'cgnslib_f.h'
>
> How can I tell to gfortran, through scons, to look also to the X directory
> for finding that library?
I’m assuming that you set some environment variables in your .bashrc which the compiler uses to find the header file in question?
If so then this probably applies:
http://scons.org/wiki/FrequentlyAskedQuestions#Why_doesn.27t_SCons_find_my_compiler.2BAC8-linker.2BAC8-etc..3F_I_can_execute_it_just_fine_from_the_command_line.
-Bill
More information about the Scons-users
mailing list