Sunday, October 30, 2011

linking libf2c.so and undefined reference to `MAIN__'

The problem is that f2c wants to link to the MAIN__ function which is

the "fortran main". Apparently it is just a dummy function call. And
the fix is quite simple:

Add "int  MAIN__( ) {  return 0; }" somewhere is the sources.

Or pass the option -u MAIN__ to the linker.

The attached patch correct the problem.

No comments:

Post a Comment