[Scons-users] No executable for fortran program with module

Christopher Dimech dimech.christopher at gmail.com
Sun Oct 5 11:31:16 EDT 2014


Currenty I am using a development branch so I have to
pick the correct files. Will try your suggestion though,
see what happens.

On 5 October 2014 16:19, Gary Oberbrunner <garyo at oberbrunner.com> wrote:

> Great news.  Now I'm not a Fortran guy, but SCons is supposed to be
> able to scan Fortran sources to find module names and do the right
> thing with them.  So you might be able to just omit endian.f from your
> source list and not worry about removing it from the obj list,
> reducing your code to just env.Program('testconvert.x',
> 'testconvert.f') or something like that.
>
> On Sun, Oct 5, 2014 at 10:51 AM, Christopher Dimech
> <dimech.christopher at gmail.com> wrote:
> > Changed it like you said with some modification to env.Program and
> > the program builds and runs correctly.
> >
> > path = ['/bin', '/usr/bin', '/home/cdim/Local/gcc-4.9.0/bin']
> >
> > env = Environment(
> >          ENV = {'PATH' : path},
> >          tools=['default','gfortran'],
> >          LINK='gfortran',
> >          LINKFLAGS='-g',
> >          FORTRANFLAGS='-ffree-form -g'
> >       )
> >
> > sources = ['testconvert.f', 'endian.f']
> > allobjs = env.Object(sources)
> >
> > # Get rid of the .mod names
> > objs = filter(lambda o: str(o)[-4:] != '.mod', allobjs)
> >
> > env.Program('testconvert.x', objs)
> >
> >
> >
> >
> >
> > On 5 October 2014 15:21, Gary Oberbrunner <garyo at oberbrunner.com> wrote:
> >>
> >> On Sun, Oct 5, 2014 at 9:27 AM, Christopher Dimech
> >> <dimech.christopher at gmail.com> wrote:
> >> > Good afternoon Gary,
> >> >
> >> > It would help if you can write down the code you would write,
> >> > as I only started using it yesterday and can be confusing.
> >>
> >> Try something like this (untested):
> >>
> >>  env = Environment(tools=['default','gfortran'], LINKFLAGS='-g', ENV =
> >> {'PATH' : path}, FORTRANFLAGS=['-ffree-form', '-g'])
> >>
> >> --
> >> Gary
> >> _______________________________________________
> >> Scons-users mailing list
> >> Scons-users at scons.org
> >> https://pairlist4.pair.net/mailman/listinfo/scons-users
> >
> >
> >
> >
> > --
> > Christopher Dimech
> >
> > _______________________________________________
> > Scons-users mailing list
> > Scons-users at scons.org
> > https://pairlist4.pair.net/mailman/listinfo/scons-users
> >
>
>
>
> --
> Gary
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>



-- 
Christopher Dimech
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20141005/d2b5448d/attachment.html>


More information about the Scons-users mailing list