← Back to team overview

dolfin team mailing list archive

Re: pyDOLFIN

 



Anders Logg wrote:
On Thu, Aug 10, 2006 at 02:22:03PM +0200, Garth N. Wells wrote:
Anders Logg wrote:
On Thu, Aug 10, 2006 at 12:51:40PM +0200, Garth N. Wells wrote:
Anders Logg wrote:
Strange. I had the same problem and then the make install at the top
level solved the problem.

Do you have MAIN__ in your _dolfin.so? What do you get with

    nm local/lib/python2.4/site-packages/dolfin/_dolfin.so | grep MAIN

Yes.

$ nm local/lib/python2.4/site-packages/dolfin/_dolfin.so | grep MAIN
          U MAIN__
I don't have this symbol. I did a search on this and it seems to be a
Fortran thing (don't know why it should show up).

It's probably from PETSc which does have some Fortran code if a Fortran compiler is detected.

Makes sense.

Does it help if you add the following somewhere, to for example
SettingsGlue.cpp in src/pydolfin?

int MAIN__() { return(0); }

And then regenerate the SWIG interface + make install.

Doesn't help. I'll try some other things.

ok. From what I understand, it should help to define MAIN__ somewhere
in the code.


extern "C" does the trick!

Just need to put

  extern "C"
  {
    int MAIN__()  { return(0); }
  }


in SettingsGlue.cpp

Garth


References