← Back to team overview

yade-dev team mailing list archive

Re: Fortran libraries

 

Thanks Vaclav.  I am linking to another open source code.  I'll try what I can do with what you told me.


Yours,

Boon

> From: eudoxos@xxxxxxxx
> To: yade-dev@xxxxxxxxxxxxxxxxxxx
> Date: Thu, 25 Mar 2010 11:07:47 +0100
> Subject: Re: [Yade-dev] Fortran libraries
> 
> > Thanks Vaclav for such a quick reply.
> > 
> > Could you explain to me more clearly.  I am quite clueless.
> >     * f77 -c   testF.f 
> >     * g++ -c testC.cpp 
> >     * g++ -o test testF.o testC.o -lg2c 
> > 
> > From the above example, testF.f is the fortran code i want to link,
> > and g2c is the corresponding library    Could you explain an example
> > on how to do it to me please in SConstruct?  
> 
> Depends what you want to link it to. All plugins in pkg/ are linked
> automatically and there is no way to add such things to them. The
> easiest would be to have your plug in in extra perhaps, where you
> specify for each plugin what LIBS it needs (including other plugins from
> yade using linkPlugins). I think if you add something like to
> extra/SConscript
> 
> env.SharedLibrary('CWBoonPlugin',['testC.cpp','testF.f'],LIBS=env['LIBS']+linkPlugins(['SomePluginFromPkgYouUse','OtherPluginHere'])+['g2c'])
> 
> that should do the trick. Scons should pickup the fortran compiler
> automatically, but if it uses one you don't want (i.e. gfortran instead
> of g77), read "man scons"; you should be able to additionally pass
> something like FORTRAN='f77' if needed as option.
> 
> v
> 
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-dev
> Post to     : yade-dev@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-dev
> More help   : https://help.launchpad.net/ListHelp
 		 	   		  
_________________________________________________________________
Hotmail: Trusted email with powerful SPAM protection.
https://signup.live.com/signup.aspx?id=60969

Follow ups

References