Re: [f2py] link options with f2py (gfortran on mac)
Juergen Wieferink <[email protected]> Sun, 6 Mar 2011 21:08:01 +0100
| Newsgroups | gmane.comp.python.f2py.user |
|---|---|
| Message-ID | <[email protected]> |
Hi, as far as I understand things, f2py tries to be clever when inducing fortran versions from file names. If you do not have any .f90 file file, the corresponding libraries are not linked. Often, adding an empty dummy.f90 file to the projects solves the problem. Best regards, Juergen Am Freitag 04 März 2011 21:31:16 schrieb Brian Toby: > After multiple attempts reading the f2py documentation, I have found no way > to supply link-time options for f2py; is there a method? > > For example, I am using > > f2py -c pack_f.for -m pack_f --fcompiler=gnu95 --f77exec=/sw/bin/gfortran > --f77flags="-fno-range-check" > > (aside, I am not sure why I need to use --f77... options, but --f90flags > does not get used.) > > I would like to specify the options -static-libgfortran and -static-libgcc > in the final run of gfortran, so that the resulting .so file does not > require libgfortran and libgcc, but I have not found a way to make this > happen. I gather that I need to append to variable linker.so, but short of > editing the python scripts, I don't see a way. Is there something I am > missing? > > Brian