[F03] EXTENDS_TYPE_OF, CLASS IS and libgfortran

Janus Weil janus@gcc.gnu.org
Wed Nov 4 07:25:00 GMT 2009


Hi all,

>> Now, first technical question: How do I correctly tell the libgfortran
>> Makefile to pick up this file, and add the function to the library?
>
> You add the file to Makefile.am, probably to the gfor_helper_src
> variable.  Then you build everything.
>
> This regenerates Makefile.in by running autoconf automatically.  Make
> sure (beforehand :-) that you have the correct version of autoconf, and
> make sure to check Makefile.in against the SVN version to catch any
> unpleasant surprises that may suddenly raise their ugly head.
>
> Declare your function if you want it to be callable from the front end,
> and use the export_proto macro on the declaration.  You can do that in
> the file itself, unless you want to call it from somewhere else; then it
> should go into libgfortran.h (and you should use iexport_proto).
>
> Add your new global symbol to gfortran.map.

Ok, I have now concocted a patch, following Thomas' suggestions.
However, when I use it to compile a simple test case, I get the
following:

/tmp/ccOHXez5.o: In function `MAIN__':
test.f90:(.text+0x6a): undefined reference to `_gfortran_is_extension_of'

Does anyone have an idea what I'm doing wrong?

Cheers,
Janus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: extends_type_of.diff
Type: text/x-diff
Size: 11503 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20091104/d6ac409a/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.f90
Type: application/octet-stream
Size: 210 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20091104/d6ac409a/attachment.obj>


More information about the Fortran mailing list